-
Notifications
You must be signed in to change notification settings - Fork 649
Custom HTML Attributes in input field #744
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
Comments
Hi @sisodiakaran I don't think this is currently supported but this is something I've also wanted in the past. The ability to add data attributes to input fields. So like you say above, properties prefixed with 'data-' or maybe a 'data' object property like below (i've made up another data attribute called braintree-order)
Which would then appear in the rendered form html as:
I don't think this is currently supported but it could be useful. |
Someone managed to insert html properties in inputs? |
Has anyone managed to insert html properties in inputs as of April 2017? I'm having this issue right now. |
@joelwkent did you ever get anywhere on this? I assume it would only take a template modification and a function on scope to serialize into a string like (using your example) <input data-braintree-name="number" data-braintree-order="3"/> An add on can modify the form object, so conceivably you could put the function in the form object and then modify the templates to call it once without too much trouble. Thoughts? |
Can anyone has resolved this issue? |
Is there a way to add custom attributes to input field?
I tried like this:
Thanks
The text was updated successfully, but these errors were encountered: