• I have the following html code to process a form:

    <form id="finform" method="post" action=Cadiz.php>

    <input class="submit_btn" type="submit" value="Calculate">
    </form>

    As can be seen from the forms code, when you click on the Submit button ( “Calculate”) runs the file Cadiz.php.

    With Insert php code snippet, I created a snippet with the name of Cadiz and put in this snippet the code from Cadiz.php file.

    Could you tell me please how I should correct the action=Cadiz.php code so that the form would use the snippet Cadiz?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The snippets are worked by shortcodes and this is not possible to use a shortcode inside form since shortcodes are not allowed in html attributes.

    Thread Starter andrayleo

    (@andrayleo)

    Do I understand correctly that snippets (including using shortcodes) cannot be used to process forms using php code?

    You can’t set a snippet as form action.You can create the form and its action in the same snippet.

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

The topic ‘Using insert php code snippet when processing a form on a website’ is closed to new replies.