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

    can you tell me how to automatically field in a field based on the value of a prior field

    Asked by billylevine2003gmailcom on June 26, 2013 at 06:42 AM
  • Profile Image

    Answered by sidharth_kch on June 26, 2013 at 07:45 AM

    @billylevine2003gmailcom

    Do you want to get the value of one field and display in another field of the same form? Unfortunately such feature is not available currently.

    You will have to download your form's source code and add custom code to implement your requirement.

    I have created a sample for you, please have a look at this: https://shots.jotform.com/sidharth/Populate%20dropdown%20with%20textbox%20value_(31693922742863)/Populate%20dropdown%20with%20textbox%20value.html

    If you the values in textbox, it will automatically display it in the dropdown. Are you looking for something similar?

    Thanks,

    Sidharth

  • Profile Image

    Answered by sidharth_kch on June 26, 2013 at 07:57 AM

    @billylevine2003gmailcom

    I checked your message on another thread. Sorry I may have not understood your requirement. 

    Please refer this guide for more information on how to use url parameters: http://www.jotform.com/help/71-Prepopulating-the-fields-to-your-JotForm-via-URL-parameters

    Let us know if you need further assistance.

    Thanks,

    Sidharth

  • Profile Image

    Answered by billylevine2003gmailcom on June 26, 2013 at 01:04 PM
    year answers have been very help ful.
    I actually have two similar question......prepoulating within a form and
    prepoulating between forms
  • Profile Image

    Answered by billylevine2003gmailcom on June 26, 2013 at 01:06 PM
    this is great can you show me the custom code
  • Profile Image

    Answered by sidharth_kch on June 26, 2013 at 01:48 PM

    @billylevine2003gmailcom

    When you view this form, you can right click on your browser and click "View page source" to get the source code of this form:

    https://shots.jotform.com/sidharth/Populate%20dropdown%20with%20textbox%20value_(31693922742863)/Populate%20dropdown%20with%20textbox%20value.html

    Should you have any questions please feel free to contact us.

    Thanks,

    Sidharth

  • Profile Image

    Answered by billylevine2003gmailcom on June 26, 2013 at 01:56 PM
    you are very helpful but which section is customer code.
    Would it be helpful if I sent you my form and you could show me one.
  • Profile Image

    Answered by billylevine2003gmailcom on June 26, 2013 at 01:59 PM
    I just can't tell what I have to input versus what is taken care of by
    jotforms
  • Profile Image

    Answered by sidharth_kch on June 26, 2013 at 03:03 PM

    @billylevine2003gmailcom

    Here is the custom javascript code in my sample form:

    function addTextValue1() {

     

            var valTextBox1 = document.getElementById("input_1");

            var myDropdown = document.getElementById("input_5");

            myDropdown.innerHTML = "";

     

            var option = document.createElement("option");

            option.text = valTextBox1.value;

            option.value = valTextBox1.value;

            if (valTextBox1.value == "")

                return;

            try {

                myDropdown.add(option, null);

            } catch (error) {

                myDropdown.add(option);

            }

            ///////////////////////////////////////////

            var valTextBox2 = document.getElementById("input_3");

     

            var option2 = document.createElement("option");

            option2.text = valTextBox2.value;

            option2.value = valTextBox2.value;

            if (valTextBox2.value == "")

                return;

            try {

                myDropdown.add(option2, null);

            } catch (error) {

                myDropdown.add(option2);

            }

     

            ///////////////////////////////////////////////

            var valTextBox3 = document.getElementById("input_4");

            var option3 = document.createElement("option");

            option3.text = valTextBox3.value;

            option3.value = valTextBox3.value;

            if (valTextBox3.value == "")

                return;

            try {

                myDropdown.add(option3, null);

            } catch (error) {

                myDropdown.add(option3);

            }

        }

    In addition to javascript code, here are some code changes in the existing jotform code:
    <input type="text" class=" form-textbox" data-type="input-textbox" id="input_1" name="q1_textbox1" size="20" onblur="addTextValue1();"/>
    <input type="text" class=" form-textbox" data-type="input-textbox" id="input_3" name="q3_textbox2" size="20" onblur="addTextValue1();"/>
    <input type="text" class=" form-textbox" data-type="input-textbox" id="input_4" name="q4_textbox3" size="20" onblur="addTextValue1();"/>
    The bolded text is the addition.
    Thanks,
    Sidharth
  • Profile Image

    Answered by billylevine2003gmailcom on June 26, 2013 at 03:09 PM
    very help ful
    so if I take a standard from and add above using the correct name for
    fields then I should be ok
    I will try....and thank you
    also what is the process to add custom code.....(edit the the source code
    of jotforms)
    On Wed, Jun 26, 2013 at 3:03 PM, JotForm Support Forum
  • Profile Image

    Answered by sidharth_kch on June 26, 2013 at 03:46 PM

    @billylevine2003gmailcom

    Yes if you change the names, it should work with your form too. I you get into any issues, we are here to help you.

    Yes you should download your form's source code and add the custom code. 

    Please let us know if you need further assistance.

    Thanks,

    Sidharth

  • Profile Image

    Answered by billylevine2003gmailcom on June 26, 2013 at 03:47 PM
    so now I follow that you must do it outside of jotform......for custom
    code.......I see the code from your sample and email but when I import to
    jotform then custom functionality disappears.....is this correct.
    Also on a side note do I need custom code to dyanamically pass values from
    one jotform to another. How do I do this?
    Thanks for your help
  • Profile Image

    Answered by sidharth_kch on June 26, 2013 at 04:19 PM

    @billylevine2003gmailcom

    Custom code cannot be added back to JotForm. 

    To dynamically pass values from one form to another, please refer this guide: http://www.jotform.com/help/71-Prepopulating-the-fields-to-your-JotForm-via-URL-parameters

    Thanks,

    Sidharth

  • Profile Image

    Answered by billylevine2003gmailcom on June 28, 2013 at 08:19 AM
    hello.....in the example provide which as been very helpful.......I would
    like to able to do the following
    2 fields input 1 and pre populate....input 1 is value.....pre-populate is a
    drop down with the default set to what ever is set by option 1
    .....so I believe all I have to modify to your example is to create a set
    of static options for pre-populate field which but the default is set by
    input from field 1 as is in the current code
    does that make sense
    On Wed, Jun 26, 2013 at 2:03 PM, JotForm Support Forum
  • Profile Image
    JotForm Support

    Answered by Welvin on June 28, 2013 at 09:09 AM

    Hi,

    Base on the example given by my colleague, that's yes. After creating your form, get the field ID for each and copy/replace the codes provided by my colleague.

    If you find trouble doing this, let us know so we can check and help you correct that.

    Thanks