WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Fast Secure Contact Form] Add form with PHP

[Plugin: Fast Secure Contact Form] Add form with PHP

  • Hello,

    I’m looking for a way to add at any post (within a specific category), so i have a template for its !

    I just want a PHP code or the way for changing “[si-contact-form form=’x’]” in the source code. I’m looking for anyway, i think, i’m not the first, can you help me?

    something like “include(…)”, it would be the best or better?

    Thanks a lot
    Sorry for mistake, i’m french πŸ˜‰

Viewing 9 replies - 1 through 9 (of 9 total)
  • Ditto this. Would like to be able to make a php function call rather than the shortcode for a template I’m making. Something like:

    <?php fscf('1'); ?>

    Plugin Author Mike Challis
    Participant

    @mikechallis

    How can I add the contact form to a 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β€²

    Didn’t work.

    Plugin Author Mike Challis
    Participant

    @mikechallis

    rtomasso then the place where you put the code either is not a PHP file, or is not including the WordPress plugins initialization. What file and where are you trying to place the code?

    I put the code inside a Executable PHP widget. I did some more work and the form does display as part of index.php, but doesn’t seem to work inside the sidebar processing.

    Plugin Author Mike Challis
    Participant

    @mikechallis

    Side bar widgets may not have the plugins initialized, that is why I made this FAQ page:

    How to add a form in a sidebar widget

    Awesome. That worked.

    Chris
    Participant

    @lamordnt

    The code Mike posted to use in the page template worked for me. `<?php
    if ( isset($si_contact_form) ) {
    echo $si_contact_form->si_contact_form_short_code( array( ‘form’ => ‘1’ ) );
    }
    ?>`

    Thanks Mike! Great Plugin!

    GinsBabu
    Member

    @ginsbabu

    Yes….the php code worked for me too…

    But can i know why the shortcode method didn’t work?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Fast Secure Contact Form] Add form with PHP’ is closed to new replies.