formie icon indicating copy to clipboard operation
formie copied to clipboard

Add ability to use the labels or values for option-based fields for email notifications

Open engram-design opened this issue 2 years ago • 4 comments

People want to choose whether to use the value or label for options in email notifications. This should be configurable on the field for Dropdown, Checkboxes and Radio Buttons.

https://github.com/verbb/formie/issues/800 https://github.com/verbb/formie/issues/735 https://github.com/verbb/formie/issues/756

engram-design avatar Sep 05 '22 11:09 engram-design

Upvoting this feature request. Would be great to be able to show labels instead of values for dropdown fields - much more user friendly and meaningful, especially for the person who submitted the form, as the data will match what they selected.

steverowling avatar Sep 28 '23 11:09 steverowling

Still undecided on how to manage this information, as depending on the recipient they could want different things. Admin's for example might want the value, but for customers, it makes sense to show the only bit of information they see - the label. As such, this might need to be configured in the email notification.

engram-design avatar Sep 28 '23 11:09 engram-design

How about having separate placeholders in the email notifications builder:

  • All form fields (values) - outputs all form fields and uses the values of all dropdown, checkbox, radio button fields
  • All form fields (labels) - outputs all form fields and uses the labels of all dropdown, checkbox, radio button fields

That probably covers the most common scenarios, and you wouldn't need to add per-field settings.

steverowling avatar Sep 28 '23 11:09 steverowling

That's an option for sure, although it adds more complexity to adding fields to the content. I'm not sure novice users will understand the difference, particularly if no fields in the form contain an options-based field.

If anything, I'm leaning towards making this a breaking change by changing fields to use their labels, and giving people the option to use values as well. I think 99% of the time, labels should be used.

engram-design avatar Sep 28 '23 11:09 engram-design