You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful if view attributes could be passed to individual choice field options in a similar way as attr for most field types. Currently it seems not to be possible without duplicating both ChoiceList PHP class and duplicating both choice_widget and widget_choice_options template blocks.
If the core form module supported (arbitrary) attrs in choice options, it would allow easy extension of the core choice field type for custom types. Custom data could be passed to the template, allowing HTML like:
It would be useful if view attributes could be passed to individual
choice
field options in a similar way asattr
for most field types. Currently it seems not to be possible without duplicating bothChoiceList
PHP class and duplicating bothchoice_widget
andwidget_choice_options
template blocks.If the core form module supported (arbitrary) attrs in choice options, it would allow easy extension of the core
choice
field type for custom types. Custom data could be passed to the template, allowing HTML like:In my example,
data-url
would have been passed as an attribute to each option.The text was updated successfully, but these errors were encountered: