PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

pre filling a form with the data of the previous form?

  1. f_devocht
    Member

    I have a submission form where parents can subscribe their child in a school.
    See here: http://tinyurl.com/cn9v8km
    When the first child is subscribed, the form must ask it they want to enter a 2nd child.
    If yes, the new form (with a different layout) must be prepopulated with the data from the first child (address, phone, email etc).
    Is there a way to achieve this?

    Posted 11 years ago on Friday December 7, 2012 | Permalink
  2. f_devocht
    Member

    Found the info here: http://www.gravityhelp.com/documentation/page/Allow_field_to_be_populated_dynamically
    and here:
    http://zackeryfretty.com/redirect-to-a-specific-url-based-on-submissions-with-gravity-forms/
    I'm sending the info in the confirmation text.

    Posted 11 years ago on Saturday December 8, 2012 | Permalink
  3. Runamok81
    Member

    If you're looking to copy the input from one field to another on the SAME form and page then look here.
    http://www.gravityhelp.com/forums/topic/how-to-populate-a-hidden-field-with-een-other-field#post-81974

    Adding the code below to your functions.php will get the job done.

    <?php
    
    add_action("gform_pre_submission", "pre_submission_handler");
    function pre_submission_handler($form){
        $_POST["input_14"] = "new value for field 14";
    }
    ?>
    Posted 11 years ago on Tuesday December 11, 2012 | Permalink