Associate a php function to a submit button created using Visual Composer

92 Views Asked by At

I have created a custom form using Visual composer in wordpress with two fields

1) Name 2) Email Address

Now on clicking submit button i want to store these values in session variables. I have created the function for the same. How cn i associate the function with the button.

1

There are 1 best solutions below

0
On

You can run your PHP function using wp_ajax action hook on button click.

Reference Link : How to run ajax on click