Title: PHP function on submit
Last modified: June 1, 2018

---

# PHP function on submit

 *  Resolved [Joe](https://wordpress.org/support/users/joecole1/)
 * (@joecole1)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-function-on-submit/)
 * Hello,
 * Great plug-in, I’m really enjoying it!
 * I run a woocommerce shop and am using your plug-in to run post-purchase surveys.
 * After a survey, we send a coupon to the customer. I have messed around with the
   MySQL connection function, but because this is a post and post meta function,
   a simple MySQL query doesn’t work… I would need to tie in to the WordPress and
   woocommerce functions.
 * Any chance of adding custom PHP function as a post-submit action?
 * My next solution would be to use the current JavaScript functions, but that would
   lead to security issues where someone on the page could inspect the page and 
   get the coupon without actually submitting the form.
 * If not custom PHP on submit, maybe an area similar to the MySQL connection that
   allows us to execute WordPress functions after submit using the submitted data?

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

 *  Plugin Contributor [Form Maker Support](https://wordpress.org/support/users/formmakersupport/)
 * (@formmakersupport)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-function-on-submit/#post-10361199)
 * Hi!
 * Thanks for your kind words.
 * Unfortunately, the plugin does not have the mentioned functionality. However,
   if you can give us few more details about what do you want to achieve with the
   plugin, most probably we will be able to show the places where you can add the
   corresponding codes.
 * Maybe in the future, our development team will consider working on that.
 * Thanks, have a nice day!
 *  Thread Starter [Joe](https://wordpress.org/support/users/joecole1/)
 * (@joecole1)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-function-on-submit/#post-10362250)
 * Basically, I would like the ability to call a WordPress hook, action, or filter
   after the form is submitted.
 * Thank you for the offer to help, but I’ve switched to Caldera Forms which has
   this functionality in an extension. [https://calderaforms.com/downloads/caldera-forms-run-action/?utm_source=dotOrg&utm_medium=plugins&utm_campaign=cf-run-action](https://calderaforms.com/downloads/caldera-forms-run-action/?utm_source=dotOrg&utm_medium=plugins&utm_campaign=cf-run-action)
 * Thanks again!

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

The topic ‘PHP function on submit’ is closed to new replies.

 * ![](https://ps.w.org/form-maker/assets/icon-256x256.png?rev=2068681)
 * [Form Maker by 10Web - Mobile-Friendly Drag & Drop Contact Form Builder](https://wordpress.org/plugins/form-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/form-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/form-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/form-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/form-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/form-maker/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Joe](https://wordpress.org/support/users/joecole1/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/php-function-on-submit/#post-10362250)
 * Status: resolved