Invoking existing PHP code from Contact form 7 submit (2 posts)

  1. normir1
    Posted 1 year ago #

    I have in the process of moving over to wordpress. We are using contact form 7 to gather simple contact info.
    In my "old" code, I simply had a POST action on my form and the action was to invoke a piece of PHP code written by the "coders".

    How do I hook that up now - I've read the do_shortcut and the add_function posts but cant really make sense of what to do ...

    How can I duplicate something as simple as this

    <form name ="myform" id="myform" action="https://apps.xxx.yyy/apps/landsubsubmit.php" method="post">

  2. justin_flowpress
    Posted 1 year ago #

    Once you set up your form in wp-admin panel, it should be as simple as getting the form shortcode, and using do_shortcode in the template you want the form to display.

    <?php echo do_shortcode('[contact-form-7 id="1" title="contactus"]'); ?>

    This should create the html needed for the requested form in your template.

Topic Closed

This topic has been closed to new replies.

About this Topic