Use dropdown label and value #751
-
We have a contact form with several different subject types in a dropdown, and this form is going to be integrated with Freshdesk. I'd like to have the dropdown labels set to human-readable names (e.g. Technical Support) and their values correspond to specific group IDs in Freshdesk. These two different values would then be used to propagate the Subject and Group ID values for the Freshdesk integration. It looks like there isn't any way to do this directly with a dropdown field, but is it possible to accomplish this through something else like a computed field? We could handle this through an event, but I'm trying to keep the name–ID associations out of code so that it's easier to change if needed in the future. Any suggested workarounds are much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
So we'd need to introduce the field-picker for integrations to use Label and Value for option fields (Checkboxes, Radio, Dropdown). This might also carry over to variable picker values as well, for email notifications. For email notifications, you can technically use Twig in most places, using To get around this, firstly you could modify the mapped values through an event.
Another option down the track would be to use the Calculations field (a computed field), where you could pick the value or label for a field, and use that instead to map in your Integration. At the moment, you can't use shorthand Twig, because it uses JS to evaluate (not Twig), otherwise it'd be neat to use But yes, the only ideal scenario is to add both "Dropdown Field Label" and "Dropdown Field Value" options for each option field, which isn't ideal (due to the more options introduced), but the only real way to address this properly. |
Beta Was this translation helpful? Give feedback.
So we'd need to introduce the field-picker for integrations to use Label and Value for option fields (Checkboxes, Radio, Dropdown). This might also carry over to variable picker values as well, for email notifications. For email notifications, you can technically use Twig in most places, using
{myDropdownField.label}
, but then this gets tricky for multi-value fields like Checkboxes or Multi-Dropdown.To get around this, firstly you could modify the mapped values through an event.