This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Redirect URL


  1. sueswes
    Member

    When I enter a redirect URL http://www.churchstanimalhospital.com/formsubmit.php after the submit button is clicked the user is taken to the home page of the site not the formsubmit.php page. I tried just putting in /formsubmit.php so it would look in the same URL for this page, but again i was taken to the home page? What is the correct URL to take the user to another page within the website? I downloaded the program 3 days ago so I know it is the most current version

    Posted 15 years ago #
  2. yuniar

    Hmm.. that's weird.

    Can I see your form? Or even better if I could login to your MachForm.

    Mail me the detail please, send to: yuniar [at] appnitro.com


    MachForm Founder

    Posted 15 years ago #
  3. yuniar

    Apparently there was some bug with redirect not being sent properly when using the advanced form code and form review is enabled.

    Here's how to fix it, edit machform.php, search around line 190 - 194 and you'll find this block:

    if($use_javascript_redirect){
    	echo "<script type=\"text/javascript\">top.location = '{$submit_result['form_redirect']}'</script>";
    }else{
    	header("Location: {$submit_result['form_redirect']}");
    }

    change it to become:

    if($use_javascript_redirect){
    	echo "<script type=\"text/javascript\">top.location = '{$commit_result['form_redirect']}'</script>";
    }else{
    	header("Location: {$commit_result['form_redirect']}");
    }

    That should fix it.


    MachForm Founder

    Posted 15 years ago #

RSS feed for this topic

Reply