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

    Auto fill field base on selected option value

    Asked by sacredsmile on April 06, 2013 at 05:34 PM

    Hi. I am looking for a way to auto fill one field based on what is filled in another field. The reason is that i want to export the form to an excel/csv-file and import it in the accounting-software.

     

    I have a set of radiobuttons that reads like this:

     

    - 1 week: 4900kr

    - 2 weeks: 5900kr

    - 3 weeks: 7900kr

    etc.

     

    For the accounting software i need to have one field that is automatically filled depending on the choice made above (and not visible to the user of the form) that only reads:

     

    4900

    5900

    7900

    etc.

     

    Any suggestions?

    fill excel CSV not visible
  • Profile Image
    JotForm Support

    Answered by jonathan on April 06, 2013 at 06:20 PM

    Hi,

    I think you can do this using the the ff: techniques

    1. Add a hidden box field(found in power tools) to the form.

    2. Prepopulating-the-fields-to-your-JotForm-via-URL-parameters

    OR

    You will use the form's source code . This will allow you to add custom javascript code to be able to pre-populate the output field base on the selected radio option value.

    I'll try come up with the test form. I'll update you here.

    Thanks.

  • Profile Image
    JotForm Support

    Answered by jonathan on April 06, 2013 at 06:39 PM

    I actually found in our guide that do this already. This one

    -How-to-Give-Users-the-Ability-to-Easily-Copy-Content-from-One-Field-to-Another

    This is the demo form

    http://formdemos.awardspace.biz/formTemplate10.html

    Hope this help. Please inform us if you have further inquiry.

    Thanks.

  • Profile Image

    Answered by sacredsmile on April 07, 2013 at 06:55 AM

    I found a way to solve it without the one you suggested. I added one radiobutton-field for each option in the first radiobutton field, and set the only option available in each radiobutton-field as selected. Then i added conditions that links each option to corresponding radiobutton-field, and set all id's for the new radiobutton-fields to {display:none;}. Like this:

     

    First radiobutton-field:

    - 1 week: 4900kr

    - 2 weeks: 5900kr

    - 3 weeks: 7900kr

    etc.

     

    Radiobutton-field (conditioned to show only when option "1 week: 4900kr" is selected)

    - 4900 (selected)

     

    Radiobutton-field (conditioned to show only when option "2 weeks: 5900kr" is selected)

    - 5900 (selected)

     

    Radiobutton-field (conditioned to show only when option "3 week: 7900kr" is selected)

    - 7900 (selected)

     

    etc.