Hello,
Is there any documentation on how to use 'Get options from a shortcode' with a select field on a form? I have searched the support site but I cannot find any documentation. Ultimately what I'm trying to do is populate the dropdown list with values.
Many thanks
Rob
Hi Rob,
Thank you for contacting us and I'd be happy to assist.
To use the 'Get options from a shortcode' in a generic field, you just need to create a custom shortcode that can return the option titles and values in this JSON object format:
{"value": "value1", "label": "Label 1"}, {"value": "value2", "label": "Label 2", "default": true}
You'll find a good usage example of a custom shortcode for this, in this reply:
https://toolset.com/forums/topic/split-publishing-related-many-to-many-posts/#post-1215323
That shortcode gets all the posts from the "qualification" custom post type and returns the post titles and IDs as options titles and values.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Hello Waqar,
Thank you for your quick support. The information you provided was useful, but I've decided to use a different method for my particular task.
Kind Regards
Rob