Fix form labels #1004

Merged
tonyvince merged 4 commits from fix-#1001 into main 2024-07-22 22:04:55 +08:00

View File

@@ -50,6 +50,9 @@ class StyledFormBuilder < ActionView::Helpers::FormBuilder
end
def label_html(method, options)
options[:label] ? label(method, options[:label], class: "form-field__label") : "".html_safe
return label(method, class: "form-field__label") if options[:label] == true
return "".html_safe unless options[:label]
label(method, options[:label], class: "form-field__label")
end
end