formie
formie copied to clipboard
Add ability to use the labels or values for option-based fields for email notifications
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
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.
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.
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.
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.