Appnitro Software Forums » MachForm 2

Dynamic content (PHP)


  1. 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 1 year ago #
  2. 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 1 year ago #

RSS feed for this topic

Reply