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.

Automatically duplicate an entry and submit it to several forms

  1. charlesantoineidrac
    Member

    Hi there,

    My objective is to do some A/B Testing in order to optimyze my forms: I'd like to test if adding some fields to a form reduces submission for example. Having slightly different wording is also something I want to test.

    In order to do this, I would like to duplicate my initial form and modify it. Then, thanks to experiments in Google Analytics , I would be able to conduct an A/B testing. My issue is that I still need all forms entry to be recorded in my initial form.

    Is there an "elegant" way to do this ?

    Thx for your help.

    Posted 11 years ago on Tuesday April 16, 2013 | Permalink
  2. David Peralty

    There is no elegant way to do this currently in Gravity Forms. New form entries go to the form they were entered into.

    Posted 11 years ago on Tuesday April 16, 2013 | Permalink
  3. charlesantoineidrac
    Member

    Ok so maybe an "inelegant" way :)
    I was thinking at a way to create an new entry object thanks to the submitted one, while hooking into after_submission hook.

    Has anyone tried that ? It implies quite good knowledge of gravity forms recording process, so a some help from gravity form team in order to have a "healthy start" would be great !

    Posted 11 years ago on Wednesday April 17, 2013 | Permalink
  4. charlesantoineidrac
    Member

    For anyone interested, here is a way of doing it (supplied by Gravity Form Support):
    This code sends entry from form 76 to form 51.

    add_action("gform_after_submission_76", "save_lead_to_51", 10, 2);
    function save_lead_to_51($entry, $form){
      //var_dump($_POST);
        $_POST["is_submit_51"] = "1";
        $form_a = RGFormsModel::get_form_meta("51");
        $new_entry = array();
        RGFormsModel::save_lead($form_a, $new_entry); // Create an entry in GF 51
    }
    Posted 11 years ago on Wednesday April 17, 2013 | Permalink