Post results to another form - not working!

Hi,
Can someone help me understand how posting results to another form works?
I have a form (form id=2) in a landing page (landing page id=2) with 4 text fields:

  • first name,
  • last name,
  • email,
  • city
    and another form (id =3) with
  • first name,
  • last name,
  • email,
  • city,
  • address and this is used on second landing page (id=3).
    On first landing page user will add all 4 fields and after submission I sent him on email the link of second landing page. The second landing page has in it the second form with form id=3.
    I want the email and city to be fetched from the first input (from form with id 2).

Can someone tell me how to achieve these?

Thanks!!

Answer to the above question:

  1. First create Form 1 and Form 2, containing all fields you need. In my example I will show how to send email value from Form1 to Form2, so I will make sure to add Email field in both forms.

  2. Add an extra hidden field: formid to the Form1 (from where you send the results). Add label of form id as: “formid” (it is recommended not to use spaces)

Form 1 is shown on image below:

  1. After you add fields to Form1, open it again and go to Attributes > Field HTML name and keep note of all field names which you want to send to second form. E.g. I want to send only email to Form2, and Field HTML name for Email field from where I send the value (i.e. Form1) is: email_1 (see image 2)

  2. While we are still on Form1:
    Go to Actions > Post results to another form

  • Give it a name

  • Post URL: https://example.domain.com/form/submit?formId=X (here should be the ID of the form you are sending results to. In our case we send results to Form 2 which ID is 7, so the link will look like his: https://myexample.mydomain.com/form/submit?formId=7

  • Now under Override field names for the receiving form section, it’s time to add field HTML name so that Mautic knows where to send records from Form1. In Form2 ( I have also added a field Email, and that is where the email from Form 1 will go). In Form 2 the Field HTML name of email is email_2 , therefore in this action window I will add mauticform[email_2]. This means value of email_1 will go to field email_2, as shown on image below:

  • Do not forget to send the form id also by adding mauticform[formid] under formid field.

  • Save the form! We are done with Form1.

  1. On Form2 make sure you have the email field (because that is where email will go to) and check whether it’s field HTML name is email_2. See image below:

Done!
Now place your forms on landing pages and give it a try!

1 Like

Hi Dora,

I have poured over your reply and applied your solution step by step with no joy.

My forms are inserted in my Wordpress website via shortcode. Does your solution perhaps only work on mautic generated landing pages?

I am also not following the reasoning hidden field FORMID and why that field is passed to form 2 and what is actually being passed.

Hi Robm,

I have tried this only on mautic generated landing pages, however I believe it should work with other LPs as well since these settings are set during form creation. Meaning, wherever you embed forms, settings should apply.

Hidden field FormID, is what makes the linkage between forms.
Then, you should take the id of referal field and send it to destination field, so that form knows which field value to take and on which form field to put it.

Please refer to the official documentation if my explanation is not clear for you!

Bests,

I tried to follow these directions using 4.4.4 and was unable to pass between forms - anyone has been able to do this?

wow, this is a very old topic, and I think people are trying to use Post Results to another form in a complete wrong way.

“Post results to another form” action submits the data directly to the server, it is not used to autofill fields of a form within a page. if its used as detailed in the post the data submited in form1 will appear in the list of results from form 1 and 2.

in order to acomplish what the OP is trying to do (display a page with auto populate values from a different form submission), you need use a different solution, here is my suggestion:

  1. map the fields to the contact field. that way the data collected will be saved not only in the form but in the contact record.
    2A. For pages written in mautic:
    on the second form, map the field again to the contact record, then, on the behavior tab, select the option Autofill (the documentation, says this option only works on mautic pages, but I would give it a try on external page as well, before trying option 2B)
    2B. For external pages (like in wordpress)
    when composing the e-mail, and including a link to the page2, pass the values of the form as url parameters, then use this solution to fill the form from the parameters:
    Can't pre-fill form fields with procedure described in Mautic documentation - #7 by leoschuler

Alternatives to 2B would be to save the data in cookies, but this would require additional coding.

Hey @leoschuler - yes this is exactly what we went ahead and did