-
-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openModalInsert allows fields with a name attribute when building the html, but ignores it when interpreting the result #709
Comments
You can make PR if you want, it's more readable that code droped here ^^ If it's light, it can come as a core feature. |
OK. I am not sure how you update the files in dist, particularly the .min.js files. Is there a script I should run to generate the .min.js files? Or should I just check in the src changes, and leave the dist to you? |
Likewise the documentation - I am adding a few lines to docs/documentation/core/index.html to explain the use of type and attributes in openModalInsert fields, but I imagine docs/index.html gets updated by a script somewhere? |
min files are only into master, generated at release time by me.
|
Merged :) In develop for now. |
Informations
Browser version: Google Chrome | 63.0.3239.132 (Official Build) (64-bit) (cohort: Stable)
OS: Windows 10
Screen resolution:1080x1920
How to reproduce the bug?
I am trying to use radio buttons in an openModalInsert. I know this is not supported, but the bug applies to any field where a
name
attribute is set.openModalInsert has this code:
It also has an on event handler:
Note that in the event handler, it takes no account of the name attribute of the field, so $field is empty, and inputType is undefined, so toLowerCase throws an exception.
The code should either ignore the name attribute when building the html, or honour it when reading the values back. Code for the latter would be:
The code could be altered to handle radio buttons correctly by changing:
to:
If you wish I will create a pull request, but I am unsure whether you will feel the extra 7 lines of code would be useful enough.
The text was updated successfully, but these errors were encountered: