• Hi, Please could you give me an example of the recommended way to run php snippet shortcode from
    <button type=”submit” value=”Submit”>Search</button>
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • hi,
    if you want to run your snippet from the button submit do the following
    if($_POST[‘button name’])
    {
    //php code here
    }

    Thread Starter blogdropper

    (@blogdropper)

    Thanks for this, but I’m not clear how/where to insert this shortcode

    [xyz-ips snippet=”tax-search-complaint-use-system-actions-medicinal”]

    to run the search function on button click

    Thanks for your help

    Hi,
    If <form> doesnot have specific action , insert the shortcode in the same page using <? php echo do_shortcode() ?> function .
    If <form> have a specific action page insert the shortcode in the action page .

    • This reply was modified 5 years, 3 months ago by sumaiyaf.
    • This reply was modified 5 years, 3 months ago by sumaiyaf.
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘run php snippet on button click’ is closed to new replies.