WordPress.org

Ready to get started?Download WordPress

Forums

Fast Secure Contact Form
[resolved] Add FSCF to website but on a php page (6 posts)

  1. AWB Collier
    Member
    Posted 1 year ago #

    Hello,

    I have the WP plugin as my site is build on the WP platform. Is there a way to manually add the contact form where I want it to appear instead of within a post or page? I am looking to add it to my footer PHP file which has now 'content' to be able to add the form. Is this possible?

    Thank you in advance,

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

  2. Mike Challis
    Member
    Plugin Author

    Posted 1 year ago #

    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

  3. AWB Collier
    Member
    Posted 1 year ago #

    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,

  4. Mike Challis
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. AWB Collier
    Member
    Posted 1 year ago #

    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!

  6. Mike Challis
    Member
    Plugin Author

    Posted 1 year ago #

    Good find!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic