-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add support for some HTML Input attributes #62
Comments
I have plans for
|
Yes, What attrs would we support? This object is merged with Adding this would make it possible to add |
It would support any attribute you care to pass 😄 Fields add any widget attributes they're going to provide here: Line 59 in 7c25efb
Then any attributes provided during rendering, or passed into BoundField when rendering are merged over the top of them here: Line 55 in 7c25efb
This new core field property could also be the basis for allowing people to attach their own event handlers when creating istances of forms, for not much extra work... this could be a more interesting next release than I thought 👍 |
So we could simply add kwargs.widgetAttrs = kwargs.widgetAttrs || {};
object.extend(kwargs.widgetAttrs, widget.attrs, this.widgetAttrs(widget)); ? |
Awesome 👍 |
It would be very useful if newforms Field API supported some HTML attributes such as
placeholder
anddisabled
. There's any reason this isn't implemented?The text was updated successfully, but these errors were encountered: