My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Wordpress CF7 Getting all values of the Drop-down from shortcode attributes

Argjend's photo
Argjend
·Apr 10, 2020

I manage to get the default value for the drop-down in cf7 but I wonder is it possible to get all the values from the shortcode.

It would be helpful to have them with pipes since I need to pass an ID and label to it.

If I’m not clear. I am trying to build the drop-down on this form:

[select your-recipient "CEO|55"
                    "Sales|45"
                    "Support|99"]

but those three values I need to pass via shortcode.

Reference: https://contactform7.com/getting-default-values-from-shortcode-attributes/