• Resolved surrealillusions

    (@surrealillusions)


    Hi all,

    I’d like to know how you add a custom field to this plugin, via PHP, containing information from the WordPress loop.

    Essentially, a small form is displayed for each post and its excerpt on the page. It gives a user the ability to request more information about the post (in my case an activity, holiday or similar).

    I have this so far:

    <?php
    if ( isset($si_contact_form) ) {
    echo $si_contact_form->si_contact_form_short_code( array(
    ‘form’ => ‘1’,
    ‘hidden_field’ => “$event_title”,
    ) );
    }
    ?>

    Its the ‘hidden_field’ => “$event_title”, part that I need to change to display a hidden input field. At the moment, the $event_title is the_title(); WP function, and it just displays that as text on the page, which isn’t ideal 🙂

    Thanks.

    http://wordpress.org/extend/plugins/si-contact-form/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Fast Secure Contact Form] Adding a custom hidden field via PHP’ is closed to new replies.