WordPress.org

Support

Support » Plugins and Hacks » Fast Secure Contact Form » [Resolved] Add FSCF to website but on a php page

[Resolved] Add FSCF to website but on a php page

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mike Challis

    @mikechallis

    How can I add the contact form to a WordPress template manually rather than use shortcode in a page?

    Use this code:

    <?php
    if ( isset($si_contact_form) )  {
     echo $si_contact_form->si_contact_form_short_code( array( 'form' => '1' ) );
    }
    ?>

    Be sure to set the correct form number for example, for form 2 you have to set: ‘form’ =>’2′

    This may work also:
    <php? echo do_shortcode('[si-contact-form form="1"]'); ?>

    If it is a non WordPress PHP site you can use the Fast Secure Contact Form PHP version

    Hello,

    Thanks for the quick response! I have tried both code snipets and it wont work. My form does load (it is #1) when I place the standard code in the page and publish it, it just wont work in the template. Is there something I am missing, or else I need to do?

    Thanks in advance,

    Plugin Author Mike Challis

    @mikechallis

    Change the #1 to the number of the form you want.

    You might try contacting your theme author for support trying to get code working in it.

    Hi, I got it to work. It wasn’t the wrong number. The trick was to make the php think it was working in the content of a post/page as a filter. This is what worked:

    <?php echo apply_filters('the_content','[si-contact-form form="1"]');?>

    Thanks!

    Plugin Author Mike Challis

    @mikechallis

    Good find!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Add FSCF to website but on a php page’ is closed to new replies.
Skip to toolbar