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

Dynamic content (PHP)


  1. yuniar

    Radices -- You'll need to do some extra coding to pass the email from your first form to the second form.
    Please contact us directly: customer.service [at] appnitro.com

    and let me know the URL to both of your forms.
    We'll help you with the code for this.


    MachForm Founder

    Posted 13 years ago #
  2. Radices
    Member

    Thanks Yuniar I slogged through it myself and got it working. For others ..this appends the email addy from the current form (id=2) to the redirect url which is another form(id=1).

    post-functions.php

    $process_result['form_redirect']  = $form_redirect . '&email=' . $table_data['element_2'];

    where element_2 is the email field in the current form.

    You then need to edit your view-functions.php file to accept the added parameter and populate the desired field again in my case the email addy.

    On line 1682 you will find this code:

    $element[$j]->default_value = htmlspecialchars($row['element_default_value']);
    
    Right below that line, add this code:
    
    if($form_id == 1 && $row['element_id'] == 2){
    	$element[$j]->default_value = $_GET['email'];
    }

    Again you need to edit the form_id and element_id numbers to match your "receiving" or redirected form.

    Posted 13 years ago #
  3. adrearubin
    Member

    Hi, I'm looking to do the same thing where I pass an element from the URL to a hidden field; ?title=name_of_book to element_24. Does the rules above still apply? I couldn't find the code above in the lines mentioned, but i do find them elsewhere.

    Thank you.

    Posted 8 years ago #
  4. frankzobitz
    Member

    Is this what you need? http://www.appnitro.com/doc-url-parameters

    Posted 8 years ago #

RSS feed for this topic

Reply