I have a small form on my website, which I created using Jetpack plugin (it has built-in contact form creator).
I want to pull options for select input from my custom-post-type “artist
” (using the titles of the posts). Is there a way to do it?
[contact-field label='Artist' type='select' required='1' options='i want my titles go here separated by commas plus "other" option'/]
The code for the field looks like this. I believe I need to do some php+jquery stuff in this page template, but I can’t seem to get it.
With some creativity, yes, it’s possible 🙂
We create another Shortcode to create a “virtual” JetPack shortcode.
I tested this using the default post post_type.
Usage:
do_shortcode
part to suit your original shortcode[my-jet-form]
wherever you want