What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Prepopulating fields: combine 2 jotform fields into value of one field on next jotform

    Asked by veritascredit on October 17, 2014 at 10:14 PM

    I am using the post url action to post information from one form into another form this works fine.

    I would like to be able to take it one step further and merge 2 fields into the 1 field of the second form. Is this possible a tried various combinations but I seems to only allow 1 set of data into the second form.

    for example.

    FORM 1

    Client 1 first name

    Client 1 last name

    FORM 2

    Client 2 first name

    Client 2 Last name

    Client 1 first last name

    Any ideas?

    I've tried the following configuration ...

    form2.com?firstName={firstName}{lastname} 

    form2.com?firstname={firstName} {lastname}

    form2.com?firstname={firstName}={lastname}

     

    Glen

     

  • Profile Image
    JotForm Support

    Answered by jonathan on October 17, 2014 at 10:23 PM

    Hi Glen,

    Please check this discussion thread

    Were you trying to achieve something similar?

    The concatenation operator for PHP is  ('.') 

    I suggest you also check the PHP manual for proper syntax construction.

    Please inform us if you need further assistance.

    Thanks.

     

  • Profile Image

    Answered by veritascredit on October 18, 2014 at 07:15 PM

    This is what I'm trying to achieve, but I don't want to put the merged fields into a database I want to merge them into another jotform field. 

    I tried the various PHP examples in the PHP Manual however the result is the first field is ignored and the second field is placed in the field of the second form I want.

    I'm not a programmer so the answer could be staring right at me and I wouldn't know it. I'm taking my direction from this discussion thread so you have a better idea where I am coming from.

     

    again i'm trying to merge first name and last name of form 1 into coclient of form 2

    Thanks

  • Profile Image

    Answered by Ben on October 19, 2014 at 05:59 AM

    Hi Glen.

    The way you first tried should be working for you, but depends on the actual fields that you have used and their names.

    I have created a quick sample for you. It consists of 2 jotforms:

    http://form.jotformpro.com/form/42912153930955

    and

    http://form.jotformpro.com/form/42912428404956

    Now you should click on the first one and submit and it will take you to the second one filling out the fields as I understood that you wanted to. I have also included both Full Name widget and the regular textbox (we always suggest using the Full Name widget under quick tools).

    Now a link for the second jotform that I have added to the first jotforms Thank you page.

    http://form.jotformpro.com/form/42912428404956?fullName1[first]={fullName:first}&fullName1[last]={fullName:last}&txtFullName={fullName}&fullName2[first]={firstName}&fullName2[last]={lastName}&txtFullName2={firstName}{lastName}

    FullName1 and FullName2 are the Full Name Widgets and the firstName and lastName are text box widgets.

    Now there is one note about the Full Name widget. It has a lot of options that you can use to get the specific info that you need. I will go over how to use the first name field

    fullName1[first]={fullName:first}

    When we want to say to where we assign some value we will use [first],[last], etc; but when we want to get the value from where we get some value we use :first, :last, etc.

    Now as you can see at the end of the URL, I have added 2 fields one after another txtFullName2={firstName}{lastName} so this is how it can and should work, if all 3 parameters are correct, if I forgot one t (for example) in the txtFullName2 it would not allow me to receive parameters.

    txtFullName2={firstName}{lastName}

    txFullName2={firstName}{lastName}

    I hope this helps and do let us know if you have any further questions.

    Best Regards,
    Ben