I'm using Caldera WP forms plus Users for Caldera Forms add-on to generate and render user profile data forms on the front-end. The plugins enable you to create forms in the back-end and insert them via shortcode in a page or post.
When creating dropdown fields (input[tpy=select]), pre-defined select options can be defined. However, the plugin has no native option to group such select options. As this makes a lot of sense sometime, I'm thinking of a workaround like this:
- Use placeholders in pre-defined option value lists in the plugin backend, say
- Use filter to parse the shortcode's HTML output before it's finally added to the content to
- Replace strings
<option value="">--Group x--</option>with
<optgroup label="Group 1">
Does this make sense? If so, what filter to use for this approach?