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

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

Change URL redirect via form element choice


  1. inkpotprinting
    Member

    Hi

    We want to be able to send the user to different URLs once the form is complete based on a choice they made in the form, is this possible?

    Thanks!

    Posted 12 years ago #
  2. yuniar

    It is possible through some modification. You can check this post:
    http://www.appnitro.com/forums/topic/conditional-redirect-url?replies=10#post-5158

    It's an old post but the code is still valid.
    You need to modify the "includes/post-functions.php" file.

    If you are using v3, the code should be placed around line 2401 instead of 876 as the post above.


    MachForm Founder

    Posted 12 years ago #
  3. mjg234
    Member

    I am using 3.0 or 3.1. When I search for $process_result['error_elements'] = $error_elements; I find it in 4 places: Line 1455 (Getting the form properties data); Lines 1483, 1499, and 1519 (Related to captcha); and Line 2230 (sending the email). I do not see this around Line 2401.

    Thank you.

    Posted 12 years ago #
  4. evananderson
    Member

    Hello, I am on Machform 3 as well and have followed all of the below tutorials to no avail. An explicit post for this functionality on version 3 would be VERY helpful seeing as the lines changed from version 2.

    All these posts are from 3+ years ago...
    http://www.appnitro.com/forums/topic/conditional-redirect-url?replies=10
    http://www.appnitro.com/forums/topic/redirect-to-a-different-pageurl-based-on-form-results
    http://www.appnitro.com/forums/topic/multiple-redirect-urls

    Posted 12 years ago #
  5. mjg234
    Member

    For future reference on this topic:

    The code mentioned in this article ($process_result['error_elements'] = $error_elements;) - from the other old post - may be found as follows in the "includes/post-functions.php" file:

    1. Version 3.3: It is at Line 1477

    2. Version 3.2: It is at Line 1455

    3. Version 3.0 Beta: It is at Line 1412

    ============================

    You will need to test for whatever conditions you want (and whatever $form_id is correct) and then change the value in the $form_redirect variable accordingly.

    PROPS to Yuniar: There was a self-inflicted bug in the code I wrote to do the test. Once he showed me my error, I was able to get this to work properly.

    Posted 12 years ago #

RSS feed for this topic

Reply