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

    I would like to use variables on text fields

    Asked by SunbridgeInstitute on January 08, 2016 at 02:27 PM
    I am trying to do this method in the following form in field 49:

    http://www.jotform.com//?formID=60007126527952

    For some reason wherever I have a variable form field, the resulting text in PREVIEW is blank, even though the form is filled out completely. 

    Can you tell me what I am doing wrong?

  • Profile Image

    Answered by SunbridgeInstitute on January 08, 2016 at 02:34 PM

    By the way, the "method" I'm referring to is in this thread here: http://www.jotform.com/answers/728011

  • Profile Image

    Answered by Sammy on January 09, 2016 at 02:00 AM

    I'm having a bit of hard time locating field 49, do you mind telling us what the label is.

     

    Also, are you passing a value to this field or are you fetching the field values? Once we have a better understanding of what you are trying to achieve based on the suggestions from the previous thread we will be able to guide you further and resolve the issue.

  • Profile Image

    Answered by SunbridgeInstitute on January 09, 2016 at 06:46 PM

    I'm sorry for the confusion. It is a text field, and here is what it says:

    **********

    Please have your school make the payment of ${totalTuition} to:

    Sunbridge Institute
    285 Hungry Hollow Road
    Chestnut Ridge, NY 10977
    Attn: Summer Enrollment 

    Please make sure that your name and course(s)/workshop(s) are clearly indicated on the check.

    Checks can only be accepted from the accounts of Waldorf schools or institutions.

    An invoice will also be sent to {email} for inclusion with payment.

    ************

    You can see that I am trying to get the "Total Tuition" amount which is calculated in one of the former fields in the form, and also the email address, which is entered in one of the former fields in the form. I don't know what the difference is between "passing a value" and "fetching field values" so I can't really answer your question, but I hope this description is clear enough.

  • Profile Image

    Answered by Carina on January 10, 2016 at 12:30 PM

    Unfortunately it is not possible to use this feature inside the Text fields.

    An alternative is to use calculation fields instead. Some editing will be necessary:

     

    You can test and clone the demo form:  

    https://form.jotform.com/60094491864967 

    Let us know if we can assist you further.  

  • Profile Image

    Answered by SunbridgeInstitute on January 10, 2016 at 03:20 PM

    With all due respect, I know that it is possible to use this feature inside the text fields, because I saw it in one of the sample forms created for me by the help team.

    Here is the form sample so you can see it in action: http://www.jotform.com//?formID=60095554738968

    I'm trying to do exactly the same sort of thing, but it comes up as a blank or a {code} in my "preview form," rather than filling in the data.

    Can you please take a look at the difference between the two forms and see what the difference might be? As far as I can tell, they are set up exactly the same.

    By the way, in the meantime since my last question, I have eliminated the reference to email since it seemed like maybe 2 fields being fetched in one text field was asking too much.

    Thanks again for all your help.

  • Profile Image
    JotForm Support

    Answered by Chriistian on January 10, 2016 at 10:29 PM

    Hi,

     

    I understand that you want to pass a value to display in a text field. I made a sample form and managed to achieve the result achieved in the sample form you have linked.

    To pass the value to the Text field, you will have to use the Form Calculation widget. We will take the value from the calculation widget and display it in the text field. Simply input the field name of the calculation widget (in my sample form, the field name is {calculation}) to the Text field.

    Once I enter a number in the Total field, the Calculation widget will update and display the number (i.e. 23)

    Here is the link to the sample form I created: https://form.jotform.com/60098661930964

    You can clone it to your account to see how I achieved to display the calculation field to the text field.
    How to Clone an Existing Form from a URL

     

    Do inform us if you need further assistance,
    Regards.

  • Profile Image
    JotForm Support

    Answered by Boris on January 11, 2016 at 01:03 PM

    It looks like your last email didn't reach our forum software, so I'll quote it here for relevance:

    Thank you. I tried your suggestion and it worked. I am a bit confused, though, because I *was* referencing from a Calculation Widget to begin with. It doesn't really make sense why it's necessary to add an additional Calculation Widget for the same item.

    Also, please note that the instructions I was given in this thread here (http://www.jotform.com/answers/728011) are incorrect based on the advice I have gotten in this thread. It might be good if someone corrected it, to save someone else the same confusion I've had.

    Thank you for helping me make this work.

    The methods described in the previous thread do indeed work. The reason that your original form wasn't working that way was because it was using conditions (conditional logic) to update the value of a calculation field.

    Using insert conditions to update the value of a calculation field will always create conflicts between the value that the calculation field itself is trying to calculate, and the value that the condition is inserting there.

    In case of Total Tuition, it has an empty calculation, so even if you see in the form the conditionally inserted value, the {totalTuition} variable/placeholder would remain empty in the Text field because the Total Tuition calculation field didn't actually calculate any value yet.

     

    When using calculation fields, please set the calculations as described in this guide: How to perform calculation in the form.

    On the other hand, if you want to use conditional logic to calculate values conditionally, then please do not use a Form Calculation field as the output field - it will create conflicts between calculation and condition, and may even results in the wrong value (price) being forwarded to the payment tool for payment.

    Let us know if you need further clarifications or assistance, and we will be happy to help.