Appnitro Software Forums » MachForm

Redirect after submission

(8 posts)

  1. divyashpatel
    Member

    First off, this software was worth every penny and by far the best from what I have seen. Good job Appnitro team!

    My question is this. After a form is submitted and the success page is displayed, how can I have the page be redirected to a URL after x number of seconds?

    Thanks,
    Divyash

    Posted 1 year ago #
  2. Thank you Divyash...

    For redirect after success page, you can edit "view-functions.php" file for this. Go to around line 2229 and you'll see this code :

    $form_markup = <<<EOT

    then add these code above that line

    if ($form_id == 1) {
    	$custom_redirect_url = '<meta http-equiv="Refresh" content="5;url=http://www.domain.com">';
    }

    after that go to line 2234 for this code :

    <html xmlns="http://www.w3.org/1999/xhtml">

    and put this code exactly bellow that line

    {$custom_redirect_url}

    Don't forget to change the id with yours

    Posted 1 year ago #
  3. Sorry to sound thick, have followed instructions but it doesnt work :)

    $redirect_url = '<meta http-equiv="Refresh" content="5;url=http://www.mobileautoelectrics.co.uk/form/">';
    }
    $form_markup = <<<EOT
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    {$custom_redirect_url}
    <head>

    Is that the right place

    Thank you

    Posted 1 year ago #
  4. Hi Mick,

    Can you send us your "view-functions.php" file please?
    We'll check it.

    Also, let us know the URL to your form.

    You can mail to: customer.service [at] appnitro.com

    Posted 1 year ago #
  5. Sorry, I have put wrong variable name, it should :

    $custom_redirect_url = '<meta http-equiv="Refresh" content="5;url=http://www.domain.com">';

    I've update the code above.

    Posted 1 year ago #
  6. Cool, wasnt me being thick then :)

    got a problem, i have 17 forms, i changed the code on them all, but only the first form redirects, the rest just stay on the submission page.

    me thinks it could be something with this
    ""if ($form_id == 1) {""

    Posted 1 year ago #
  7. Yes, if you want to apply the customization to all forms. You can remove the condition, simply change the code from :

    if ($form_id == 1) {
    	$custom_redirect_url = '<meta http-equiv="Refresh" content="5;url=http://www.domain.com">';
    }

    to

    $custom_redirect_url = '<meta http-equiv="Refresh" content="5;url=http://www.domain.com">';
    Posted 1 year ago #
  8. Thanks for the reply,

    I have it going to a paypal button when a user clicks submit,

    But i will refer to your post for future :) :)

    Rhank you
    Mick

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.