fix form fields import

pull/381/merge
Pete Matsyburka 1 month ago
parent 6e16f81fc6
commit 634b5c37ba

@ -225,7 +225,10 @@ module Templates
is_option_number = option.is_a?(Symbol) && option.to_s.match?(/\A\d+\z/)
option = option[1] if option.is_a?(Array) && option.size == 2
option = option.encode('utf-8', invalid: :replace, undef: :replace, replace: '') if option.is_a?(String)
if option.is_a?(String) || option.is_a?(Symbol)
option = option.to_s.encode('utf-8', invalid: :replace, undef: :replace, replace: '')
end
next if type == 'select' && option.to_s.match?(SELECT_PLACEHOLDER_REGEXP)

Loading…
Cancel
Save