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

    How to auto populate fields in a form without access to source code?

    Asked by nkasic on January 05, 2014 at 09:54 AM

    I would like to achieve exactly what's described in this example: http://www.jotform.com/help/107-How-to-Enable-Prepopulating-Fields

    However, I don't have access to the source code of my site (and probably will not have). It's the large company and those are corporate rules. The only way I can use jot forms is that I get link to jot form created on the main site.

    Hence, I cannot use method described in the example above.

    Is there any other method I can use to achive the same, without touching web site's source code?

    (BTW, my form is here: http://form.jotform.co/form/40011544513843 and I want to copy address fields)

    source JotForm web site site
  • Profile Image
    JotForm Support

    Answered by Welvin on January 05, 2014 at 01:16 PM

    Hi,

    I think there's no need for you to access your website source codes. You can do this method using your form source codes. You can have the final output as an HTML file. Of course, you'll need to host or upload this HTML file to your server.

    Would you like some help about this method? Let us know. Also, can you confirm if you need to copy address field from "Adresa sjedišta" to "Adresa za primanje pošte" and "Adresa službe za korisnike" if they click the same option?

    Thanks

  • Profile Image

    Answered by nkasic on January 05, 2014 at 05:03 PM

    Hi,
    I believe this is not possible either. Our company is a big corporation and I have no access to web server. There is a team in charge of web development, maintenance, taking care about brand, colour codes/styles etc. On one page, we have a link to pdf form which potential users print out, sign, stamp and bring to us.
    My intention is to replace pdf form, which is static, with web form (jot form), which produces much better results (hand written entries are not always legible, web forms can implement data validation, can reject submission without required fields, can display help next to each field etc.)
    I can ask for link instead of targeting pdf file to to be targeting with jotform, buth that's about it.
    Nothing more I can ask, as it requires budget for development, taking ownership of the code by web dev team etc. I hope that explains my position and restrictions. Form will never be hosted on our server, it will be on your server and just be linked to from our server. Thank you page will link back to the page with link.

    I need to copy value of field "Adresa sjedišta" to "Adresa za primanje pošte - detalji" (that label is hidden) if check box "Adresa za primanje pošte" "Ista kao i adresa sjedišta" (translated it means Same as adresa sjedišta) is checked
    Additionaly, when those address fields are populated I need to hide them to make form simpler to read, but that part already works.

    Also, I need to copy value of field "Adresa sjedišta" or "Adresa za primanje pošte", depending on the choice with radio buttons "Adresa službe za korisnike" to "Adresa službe za korisnike".
    If it's the third option chosen "Posebna adresa" (separate address), then the fields should be empty so separate address can be populated.
    Ideally, when the previous check box indicating that "Adresa sjedišta" is the same as "Adresa za primanje pošte" is checked, then radio button "Adresa za primanje pošte" should be invisible because there is no need to chose between the two with radio buttons if they are the same.

    Can anything be done, and can I get access to form source if it's on your server and not embedded on our web page?

  • Profile Image
    JotForm Support

    Answered by jonathan on January 05, 2014 at 08:45 PM

    Hi,

    can I get access to form source if it's on your server and not embedded on our web page?

    You actually can.  Here is the guide How-to-get-your-Form-Source-Code

    I tried understanding your requirements as much as possibe (I apologize I have to admit its a bit confusing reading those wall of text)

    BUT in idea, you can also create a similar form described by this guide How-to-Enable-Prepopulating-Fields using multiple forms.

    You can use the Custom URL of the Thank You page to open a pre-populated form base from the content of the initial form.

    Here is a test form that does this. It came from the suggestion I had on this thread http://www.jotform.com/answers/291590

    Since you are restricted to use the form's source code and embed it to your own website, it really does limits the customization options you can do on the form.

    You should also take a look for available options in JotForm Apps page ,specifically those in http://apps.jotform.com/category/data_management 

    Hope this help in any way. Inform us if there is more we can asist you with.

    Thanks.

     

     

  • Profile Image

    Answered by nkasic on January 06, 2014 at 01:00 PM

    Hi,

    Sorry for being confusing.
    To simplify things I translated the form in English and stripped out all the unnecessary fields to create new, test form.
    It's here: http://www.jotform.com//?formID=40053311496346
    I believe now it will be much easier to understand what I'm trying to achieve.

    When I select check box "Correspondence address" - "Same as registered address", I would like the entries from correspondence address field to be copied to registered address field

    Similarly, when I use radiobuttons in the next section, when I chose option for customer care address to be same as registered address, I would like registered address entries to be copied to customer care address.
    If I choose option for customer care address to be the same as correspondence address, I would like correspondence address to be copied to customer care address.
    If I chose the third option "other address", then fields unhide and I can enter separate address.

    I checked all the JotForm Apps and neither seems to be doing what I need.
    Also, I took a look at links you suggested, but I couldn't find a solution for my problem.
    Can you please take a look once more.

  • Profile Image
    JotForm Support

    Answered by ardy0689 on January 06, 2014 at 02:43 PM

    Thank you for that additional information. I would like to clarify this a bit. Your requirements restricts only to one form and not need to pass information between multiple forms? Is that correct?

    I think you can be able to do this by using the "Calculate field" feature we have while at the same time using a normal text box(not Address Field). As you can not use "Calculate Fields" on Field Groups such as Full Name or Address Fields.

    Please see this demo form http://form.jotformpro.com/form/40055437869967 and see if this suits your requirement so that we can guide you further on it. Thank you

  • Profile Image

    Answered by nkasic on January 06, 2014 at 03:43 PM

    Yes, that's correct. There's no need to pass information between the forms.

    The demo you wrote perfectly matches the functionality I need.
    However, I'm not happy with the look and I would like to change it, i.e. I would like to hide the headers "Correspondence with copied" and "Customer Care Address with copied Correspondence" as there's no need for them to be shown. Displaying the address field is controled by check box and radio buttons.
    Also, I don't know how you managed to put text fields one next to other to simulate address field.
    When I put them they are placed one above the other.
    I cannot find the field for picking the country either (like in address field). The one in widgets is not the same as in address field (it's much bigger) so it makes form untidy.

    I put them on the top of my test form http://www.jotform.com//?formID=40053311496346 to better understand what I'm trying to describe.

    Regards.

  • Profile Image
    JotForm Support

    Answered by ardy0689 on January 06, 2014 at 04:40 PM

    Thank you for confirming it. Yes you may clone the demo form by doing the steps from this user guide
    How to Clone an Embedded Form from a Webpage? and customize it further from your account.

    The demo form is composed of 6 groups of Addresses all just using independent text boxes. Even the country field is just a normal textbox as you can not use the Country Widget you mentioned to copy data from it to the "Calculate Field" feature we have. I tried to use Drop-down boxes with country option enabled but we also do not have the "Calculate Field" option to transfer data from drop-down box to another drop-down box.

     

    In order, for you to place the fields side by side you need to Shrink them and use the LEFT and RIGHT arrow keys from the keyboard to reposition them quickly

     

    In order, to hide the Form Collapse labels, select them and change their visibility settings. You need those as I placed conditions to show or hide the Address textboxes all at once. You may refer to this guide How to Hide or Show Multiple Fields at Once Based On a Single Conditional Entry to achieve to know why I used the Form Collapse Labels.

     

    If you are curious about the Calculate fields I just paste the placeholder names to copy data from a textbox field. To get the proper placeholder names click the Cog/Gear wheel icon and click Show Properties and you will see its placeholder name. Then you can put it to another textbox by accessing its "Calculate Field" function

     

    If you need further help, please do not hesitate to inquire. Thank you

  • Profile Image

    Answered by nkasic on January 06, 2014 at 06:13 PM

    Getting closer... :-)

    I followed your instructions and made most of it work.
    I can make fields copy values of other fields using calculate fields, but what I haven't figured out is how you make it stop copying when you check box "same as registered address".
    The same question is for radio buttons.
    When I set up calculate fields they always copy no matter whether check box is ticked or not.

    I just figured it out.
    But what I don't like is that you made two sections, one with copied values and one without, and you choose which one to display on the screen depending on the checkbox.However, that means that I will always get submitted section with copied data and the one without, which will make it difficult to interpret.
    E.g. one record will have data with copied address and other address, while the other will have copied address and the other address blank blank.

    Additionally, can you help me how to make Post code and City field closer one to other.
    Thanks in advance.

  • Profile Image

    Answered by Cesar on January 06, 2014 at 11:08 PM

    If you are going to be using the default Email Notification (not Modifying the Email's fileds). You can use the following setting to hide the empty fields:

    Preferences | Advanced Settings | Hide Empty Fields on Emails

    https://cms.jotform.com/uploads/image_upload/image_upload/global/22934_SettoEnable.png

     

    In regards to the repositioning the Post Code and City field together:

    I have injected the follwoing code to my form to reposition said fields:

    #label_69, #label_76, #label_83, #label_89, #label_95, #label_101 {margin-top: -15px;}

    #cid_69, #cid_76, #cid_83, #cid_89, #cid_95, #cid_101 {margin-top: -3px;}

    This is my example form: 

    http://form.jotformpro.com/form/40058446730957?

     

    Do let us know if you need further assistance, Thank you.

  • Profile Image

    Answered by nkasic on January 07, 2014 at 07:42 AM

    Thanks, but it seems that there was a misunderstanding.
    Regarding to spacing, I thought about spacing of Post code and City fields on my form http://form.jotformeu.com/form/40053311496346 where fields are one next to other and some left or right margin need to be changed.
    BTW, what cid (in #cid_69) stands for.

    Regarding hiding empt fields on e-mails, I cannot test it on your form because for some reason Submit button is hidden, but I think it will not work anyway.

    Here are more details:
    I plan to use form to collect data needed for writing contracts. When I receive data, I plan to export them as Excel table and then mail merge them with Word template (20-ish pages), which contains place holders for fields from Excel (this form).
    Therefore, I cannot mail merge one field once, and the other field the other time, depending if correspondence address is the same as registered address or not.
    I can merge always the same field hence the information needs to be always in the same field.
    Hope this clarifies it a bit.

    Regards. 
     

  • Profile Image
    JotForm Support

    Answered by ardy0689 on January 07, 2014 at 10:36 AM

    @nkasic we apologize for the confusion. I will explain this further.

    You are correct that I used one group that does not copy and one group that does. In fact, I have created 6 groups of Address fields.

    Registered Address
    Correspondence Address that copies nothing
    Correspondence Address that copies Registered Address
    Customer Address that copies Registered Address
    Customer Address that copies Correspondence Address
    Customer Address that copies nothing

    It is based on what the user will choose on the radio buttons and the proper Address group will show. If they choose different or custom address then the groups that copies nothing will show. I separated them because we currently do not have a Condition Feature yet that manipulates the "Calculate Field" based on user choice. To be able to do that you need to get the full source code of the form and host it on your server. Then you can use a custom script to copy the values based on the user choice. Please let us know if you are willing to use this approach and I can provide you with the custom script to use.

    Regarding hiding empt fields on e-mails, I cannot test it on your form because for some reason Submit button is hidden, but I think it will not work anyway.

    Oops that was my mistake. To fix that you should add another Form Collapse field just above the Submit button so it will not be hidden away by the other Form Collapse Field

     

     

    What my colleague has suggested to you about hiding the empty fields on email, plays vital role so that you will not see extra data that are blank due to hidden fields. However, as you said it may not work especially if you are going to edit the Notification template.

    About the spacing, please use this Custom CSS Codes: this should bring the Postal and City fields closer together on your own layout

    #cid_66, #cid_82,#label_82{
    margin-left:-61px;
    }

    Please refer to this user guide on How to Inject Custom CSS Codes to inject the CSS I gave you. Do let us know what your decision might be if you wish to take the custom script approach and host it on your server so that it copies the data based on user choices without the use of additional address fields. Thank you


  • Profile Image

    Answered by nkasic on January 07, 2014 at 11:02 AM

    Hallo Ardy,

    Thanks for your quick reply.
    Unfortunatelly I cannot host source code on our server. Please take a look at the third post (second mine) from the top for explanation why, so we will have to abandon the route of writing custom script.

    Can you please take a look at my form http://www.jotform.com//?formID=40053311496346 and see why margins as in example above messed up field placement.
    Even better, can you please explain what #cid and #label elements are so I can experiment with various margin values.
    Regards. 

  • Profile Image
    JotForm Support

    Answered by ardy0689 on January 07, 2014 at 01:36 PM

    Hello, oh yes I remember now. I apologize I forgot that you are not allowed to do that as you do not have access to the web server.

    That's odd I cloned that form so that the CSS code I gave you matches your form. As you can see from my version http://form.jotformpro.com/form/40064262921952 it reduces the space in between the postal and city fields.

    This is the version in which I posted earlier

    #cid_66, #cid_82,#label_82{
    margin-left:-61px;
    }

    and this  is what I currently see to your Custom CSS

    #cid_65, #cid_66,#label_66{
    margin-left:-61px;

    The #cid_65 is the container ID or probably column ID of the postal field of Registered address. JotForm's HTML is well structured or organized

    To explain it further: Assuming that we have a single Email field that occupies one complete line in the form:

     

    <li class="form-line" id="id_1">
        <label class="form-label-left" id="label_1" for="input_1"> E-mail </label>
        <div id="cid_1" class="form-input">
          <input type="email" class=" form-textbox validate[Email]" id="input_1" name="q1_email1" size="30" value="" />
        </div>
    </li>

    When you analyzed the structure:
    A. You have 1 line that has an id of "id_1" that is also #id_1. This line contains the Label for email and the container for the Email field textbox

    B. The Label has an id of "label_1" which is also #label_1 that you can target on the CSS code

    C. The container that has the email textbox has an ID of "cid_1" or also #cid_1 that you can modify the style via CSS

    D. Of course you can also target the input box of the Email field directly which has an ID of "input_1"

    JotForm can access this all from the jotform.js library by just referencing to "1" number to get the label_, cid_,id_, input_ and target them for styling such as margins and for their behaviors.

    I hope this information is useful to you.

    If you can not host the source code then the previous approach I did is the only option for now by creating different groups of Address fields, which copies and a group that does not copy via Calculate Field.

    If you need further help, please do not hesitate to ask. Thank you

  • Profile Image

    Answered by nkasic on January 07, 2014 at 03:39 PM

    Thanks on your explanation of the fiels.
    Regarding coping fields, because I need data for mail merging, I cannot
    use the approach you suggested, and because I cannot host source code on
    our web server, I cannot use customized java scripts that you are
    willing to create.
    Therefore, it seems that we came to the end of this road, and I have to
    go back to square one and create separate address fields which users
    will have to manually copy (re-type) if they are the same.
    Regardles that we didn't achieve what we tried to do, I want to thank
    you a lot for trying so hard. On this way I learnt so much.
    I thought that similar features are very common (copying names,
    addresses etc) and already sorted in a way. Even if I have access to
    company's web server, manualy inserting java scripts is not very elegant
    solution, especially for non-programmers.
    Therefore I would suggest one solution to consider.
    I propose to develop one more Condition wizzard like on the list below:
    "Copy or empty form field"

    When you choose it, you should get something like this:

    and you would be able to use it in a number of situations.
    Best regards and thank you once more.

  • Profile Image
    JotForm Support

    Answered by jonathan on January 07, 2014 at 05:48 PM

    @ nkasic

    Hi,

    Thank you for your suggestion.

    It will be best if you create separate new thread for this feature request so that we can properly submit it to our higher team support.

    Kindly use this link http://www.jotform.com/contact/ .

    You can just copy what you have stated here and paste the message to the new thread. Add the appropriate Title/Subject for it.

    We will attend to it when we can.

    Thanks!

  • Profile Image
    JotForm Support

    Answered by EltonCris on January 07, 2014 at 06:01 PM

    @nkasic

    Maybe you can try the following workaround, this doesn't involved source code modification. You can use calculation feature to copy data from 1 field to another. Unfortunately, full address field is not supported with the calculation feature so what we have to do is to use regular text box fields for the address fields.

    Example:

    address 1

    address 2

    City

    Demo: http://form.jotform.co/form/40066600681852?

    You can clone this form to find out the setup.

    If you like this workaround, please refer to the guide below.

    1. First, you have to open calculate wizard to the field you'd like to be populated with.

    2. On the right side, there is a form fields bar that you can use to get the field variables. This is used to populate the selected field. In this example, the home address variable is placed on the billing address field.

    You can do the same for the rest of the fields.

    FYI, the address2 and city field labels are hidden thru CSS Injection, just check it on the form preferences under CSS Inject to view it.

    If you need further assistance, do let us know here. Regards!

  • Profile Image

    Answered by nkasic on January 07, 2014 at 06:50 PM

    Thanks EltonCris, we already tried using calculated fields, but your suggestion is slightly different as it doesn't have two sections, so it looks promising.

    However, that form doesn't really work as it should.
    When "Same as above?" checkbox is checked, the address section shoud be collapsed, and fields in the background filled with the data from above.
    At the moment it expands when checkbox is checked.
    By the way, what happens if you overwrite value of calculated field during filling form? Will the value at some point revert to calculated value, or will the manualy entered value remain?

    Also, I don't understand the condition you entered:
    If "Billing Address" "is equal to" "Same as above?"
    then "Show" "Billing Address Collapse"

    What field is "Billing address" in the statement and how it can be equal to "Same as above?"
    "Same as above?" is checkbox and that's the only checkbox on the form.
    And I cannot locate two "Billing address" fields that appear in the menu.

  • Profile Image
    JotForm Support

    Answered by EltonCris on January 07, 2014 at 10:09 PM

    @nkasic

    Yes, I just found out it was already suggested by Ardy. =)

    I see I did the opposite thing on the checkbox condition, sorry about that. By the way, you can correct that in the conditions setup, instead of "show" you can changed it to "hide". Anyway, I have updated the demo, I hope it makes sense this time. http://form.jotform.co/form/40066600681852. The manually entered data will remain, FYI.

    I just changed the wording on the checkbox question label to prevent confusion. Go ahead and check it. Let us know if we can be of further assistance.

    Thanks!

  • Profile Image

    Answered by nkasic on January 08, 2014 at 07:33 AM

    Hi EltonCris, 
    This is not bad, the only inconvenience is that when you empty the box and fields reveal, they are filled with data from home address and you need to overtype them.
    Also if somone overtypes them and changes mind and clicks on "Same as above?",  section will colapse and one would asume that the data are copied from above, while actually it's not.
    There is no way, as far as I understand, to link action of copying data with the status of checkbox.

  • Profile Image

    Answered by EliezerN on January 08, 2014 at 10:41 AM

    Thanks for the explanation and for pointing this out.

    What you can do to avoid showing the second address field with data on them if the "Same as above?" box is empty is to add a third group of address fields, that will appear if the box is empty, of course that will require to modify the conditions. So, I cloned the demo form of my colleague and modified it so here it is: http://form.jotformpro.com/form/40074595411956

    I also modified the Notification so that there is not confusion when the "same as above?" box has been selected or when not.

    Please note that "Same as above" fields will always appear empty in the received notification email. But when the fields of both sections "Same of above" and "Different" are empty that means that the box was selected as in the example in the image.

    You can clone my form to check the conditions I created.

    I hope this helps. Please inform us if you need further assistance with this.

    Thanks

  • Profile Image

    Answered by nkasic on January 08, 2014 at 11:04 AM

    Hi,
    We are going in circles now, as that was already proposed and dismissed. Please read the whole thread above.
    Regards. 

  • Profile Image

    Answered by johnwheeler on January 08, 2014 at 11:31 AM

    Hi,

    Like you I also requested this function when I started using Jotform months ago, Although I have the good fortune to alter the source code and it works as you would expect. Trouble is you have to update it whenever you change anything and it also stops you from having the opportunity to pre populate forms with their url method.

    You are going around in circles as although the staff here are very helpful and quick to respond to requests they do not seem to have the time to talk to each other.

    I cannot see why they cannot just add the function to enable copying the placeholder fields to either a single or multiple fields using a conditional logic on a checkbox or radio button, they appear to have most of this in place already.

    Maybe it is best for now to just copy the fields into the second address fields using the placeholders and leave it to the user to over write the second address if is not the same. This is the way I will use for now so that I can use the pre populate method or we do not bother to copy the fields at all and let the user fill in both fields with no method of assisting them until Jotform can figure it out.

    Anyway good luck.

     

    John

  • Profile Image

    Answered by nkasic on January 08, 2014 at 11:42 AM

    Hi John,
    It seems that I will have to leave it to the users to copy the fields.
    It's a shame as this is a fairly common feature on forms, and probably could have already been developed the way I proposed for the time we all spent on this and similar threads. 
    Hope that they will develop it soon.
    I hava a couple of other issues too, and as I planned to use these forms in a big company with many rules (logo, fonts, colours, security), I'm doubtfull that I'll be able to make it work.
    We'll see.
    Regards,
    Nik 

  • Profile Image

    Answered by EliezerN on January 08, 2014 at 01:36 PM

    @Nik

    Accept my apologies for have persisted on that suggestion. By now I cannot make my mind to find an alternative workaround to suggest you. But I now have forwarded a feature request to our development team so they can consider an easy way to auto-populate fields in a form without using the source code.

    We cannot promise you anything about this implementation or when this will be already available, but rest assured that we will inform you via this thread if there is any update in the progress on this.

    Thanks for your understanding.

  • Profile Image

    Answered by nkasic on January 09, 2014 at 05:21 AM

    Hi EliezerN,
    I appriciate your willingness to help and I thank you for that.
    However, we reached the limit of the application and you cannot do much about it until new feature is developed.
    I'll have to make my users manually copy data until (and if) that feature is developed. 
    That's the best that can be done for now.
    Best regards!