• Hi,

    First off – I am really enjoying using your plugin so GREAT WORK!

    I’m trying to insert the shortcode for a standard jetpack contact form using your plugin.

    I’ve seen there is a WordPress php function called “do_shortcode” but I can’t get it to work…I don’t even know if it is possible?

    Here is the code I am using:
    ************************************
    [allowphp] echo do_shortcode (‘[contact-form][contact-field label='Name' type='name' required='1'/][contact-field label='Email' type='email' required='1'/][contact-field label='Comment' type='textarea' required='1'/][/contact-form]‘); [/allowphp]
    ************************************

    To give some context; I am trying to generate a contact form from an IF argument – e.g:

    IF $event == ‘Live’ then echo [contact form]… ;
    else echo “This event has been cancelled”;

    Going further, I want to auto-populate the recipient’s email address field with a variable pulled from a mySQL database – e.g:

    [contact-form to = $organiserEmail]…[/contact-form]

    I appreciate this may be outside the remit of your support but even if you could tell me if this is at least possible, that would be a great help.

    Hope that makes sense.

    Many thanks,

    Matt

    http://wordpress.org/extend/plugins/allow-php-in-posts-and-pages/

  • The topic ‘Inserting shortcodes for jetpack contact forms’ is closed to new replies.