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
Rails adds a field_with_errors wrapper element around the invalid form element after submitting the form. This is used to style the form element with CSS (red border around an input field with invalid data for example).
The custom Fomantic UI checkbox (the iOS like toggle element) does not correctly handle this extra wrapper element making the field unresponsive: you can no longer check or uncheck the custom Fomantic UI checkbox.
As a workaround we can tell Rails not to add the wrapper element by adding config.action_view.field_error_proc = Proc.new { |html_tag, instance| html_tag.html_safe } to the config/application.rb file but this means we can no longer style form fields with errors.
Tested with fomantic-ui-sass 2.8.3 in a Rails 6.0.2 application.
The text was updated successfully, but these errors were encountered:
Rails adds a
field_with_errors
wrapper element around the invalid form element after submitting the form. This is used to style the form element with CSS (red border around an input field with invalid data for example).The custom Fomantic UI checkbox (the iOS like toggle element) does not correctly handle this extra wrapper element making the field unresponsive: you can no longer check or uncheck the custom Fomantic UI checkbox.
As a workaround we can tell Rails not to add the wrapper element by adding
config.action_view.field_error_proc = Proc.new { |html_tag, instance| html_tag.html_safe }
to theconfig/application.rb
file but this means we can no longer style form fields with errors.Tested with fomantic-ui-sass 2.8.3 in a Rails 6.0.2 application.
The text was updated successfully, but these errors were encountered: