advancedforms / advanced-forms

WordPress plugin to create forms using Advanced Custom Fields
75 stars 14 forks source link

Strip tags from field names before populating <input type="select"> #29

Closed chladog closed 5 years ago

chladog commented 6 years ago

doesn't support any tags.

No need to strip elsewere as "af-field-dropdown" supports tags.

fabianlindfors commented 6 years ago

I'm sorry about my super late reply to this! I finally got around to look at it.

This sounds like a fine change to make but if you don't mind me asking, in what situation does it pose a problem to not strip tags?

chladog commented 6 years ago

hi, glad you had a look at it. The problem for me happened when using Inline-SVG icons in field labels. These tags are long and browsers can't handle them in the input field. But problem would appear with any HTML tags used in the label, like bold, italic... Input field where this happens is "AF -> Notifications -> Send to 'Select from field' "

fabianlindfors commented 6 years ago

I see your problem!

I will fix this. Is it alright if I add the fix manually instead of merging your PR? Your commit seems to a lot of changes and I'd rather add a fix to the _af_form_field_choices function.

fabianlindfors commented 5 years ago

I'll close this for know. Let me know if you want it re-opened