-
Notifications
You must be signed in to change notification settings - Fork 76
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
Old trick doesn't work #9
Comments
What trickery is that? |
On a classic form (without javascript), if the backend always wants a datum about a certain name (mostly on radio or checkbox), you have to make a trick which consists of doing your normal input:
plus another hidden input just above in case where the user doesn't check the input.
In this way, if the input[type=text] isn't checked, it's the input[type=hidden] which is sent. If it's checked, it's the input[type=text] overrides the name and it's it which is sent. The thing is with your plugin, this trick doesn't work; because it doesn't override but it makes an array for this name. |
@kud I see. This plugin is a mere transformation of I will leave this open until README is updated to reflect this behaviour. Thanks for letting me know! |
Okay thank you @hongymagic for having taken the time to answer me. ;) |
Now on README |
Hello,
Be warned, the old trick where you have:
doesn't work anymore, because it makes an array.
I find this solution:
but maybe it could be good to have data-attr to handle that.
The text was updated successfully, but these errors were encountered: