0

I have created a form using visual composer. In this form I want to assign a PHP function defined in functions.php to the submit button.

How can I do this?

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135

1 Answers1

0

You Can Do Like This

// Your Shortcode to output the custom PHP in Visual Composer.
function my_vc_shortcode( $atts ) {
   // Your Custom Php Code Here 
   return '<h2>This is my custom PHP output!</h2>';
}
add_shortcode( 'my_vc_php_output', 'my_vc_shortcode');

Check Source Code Here:

  1. https://theremotedev.com/custom-php-code-visual-composer-pages/
  2. Insert PHP code into the Visual Composer
RïshïKêsh Kümar
  • 4,734
  • 1
  • 24
  • 36