• I want to create forms that let me have my own form action, as in to call a PHP script that will process the form contents. I am using Visual Composer, and while I can insert a standard HTML form in a text block that does let me set my own action, it strips out the form validation, meaning my “onsubmit” function call gets stripped from the form once I update the text block.

    I can’t find a form plugin that lets me insert my own form action. Everything either gets sent via email or stored automatically in a database. However, I need to perform my own actions on the data before making an insert or update to a MYSQL table.

    Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You could make a template file in your childtheme with the code, and set the page to use that template? In that template file you just can write your wanted PHP code?

    Thread Starter JoefromPhilly

    (@joefromphilly)

    I did something a bit different. I took the form HTML, wrapped an echo tag around it, and built a shortcode function that I then added to the functions.php file. Now, in Visual Composer, I just enter the shortcode, and voila, it calls the form, and the validation call stay there. Works perfectly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need To Create A Form That Calls a PHP Script and Does Form Validation’ is closed to new replies.