JotForm User Guide / Advanced Features /

How to Manipulate Text (String) with Conditions and Calculation

How to Manipulate Text (String) with Conditions and Calculation

When integrating forms with your current existing workflow, oftentimes, you'll find yourself stuck on something really specific, like:

No matter what the use case may be, knowing how to manipulate texts (strings) would be a huge help in building interactive forms.

So in this guide, we'll be focusing on the Use Cases mentioned above. Your imagination and creativity would only go as far as how you understand Conditions and Calculations.

Here's the demo form that was used for this guide.

  1. Create the fields needed for the link or URL to be generated. In the example form that we'll be working on, there are only two options - the product code (a drop-down menu) and whether it's customized or not (a radio button).
    Product Code
  2. Add the textbox field that will fetch the generated URL.
    Generated Url
  3. Then set up the Condition as follows:
    Generating Links Based on User Input
    Generating Links Based on User Input

You would notice that there are no operators needed (i.e. no need to add or use the plus (+) sign to concatenate the texts). Just type them in directly then add the fields in between when needed.{addFieldHere}&custom={addFieldHere}

Auto-Generate Email Addresses

Create the fields needed to generate a well-formed email address. The part before the @ symbol (local-part) identifies the name of a mailbox. This is often the username of the recipient, e.g., jsmith. The part after the @ symbol (domain) is a domain name that represents the administrative realm for the mailbox, e.g., a company's domain name,

In our example form, the local-part would be a textbox and the domain would be a drop-down menu with predefined domain options.

First name

This will be the Condition to populate the other textbox that will fetch the calculated text.

Auto-Generate Email Addresses

Auto-Generate Email Addresses

Just like the previous method, you won't need to use operators to concatenate texts/strings. Just type them in - this time, you add the textbox field, an @ symbol, then the drop-down field.


Create a Comma-Separated Set of Values

Lastly, to achieve this, the same idea/principle still applies. Just add the fields needed and append the comma in between them while ensuring all of them are rendered as texts/strings (with a brown background).

Create a Comma-Separated Set of Values

Create a Comma-Separated Set of Values

Here are some pointers when handling texts or strings with Conditions or Calculations:

  • Anything you manually type in the Calculate field will be treated as text by default (with brown background).
  • Any field you add (when you click the Add Field button) will be added as a number by default (with black background).
  • If you wish to toggle back and forth from text to number (and vice versa), just click on each block.
  • Pressing the TAB key will automatically render the text you typed in as a block of text/string.

Here's the completed form so you can see it in action. Or, just watch the short clip below to see how it works.

Comma Separated Values

Comma Separated Values

You can clone this form, here's how, so you can have a closer look at how it was set up.

Give it a whirl and don't hesitate to leave a comment if you have questions.

Contact Support:
Our customer support team is available 24/7 and our average response time is between one to two hours.
Our team can be contacted via:
Contact JotForm Support:

Send Comment


  • Elli_Sullivan


    Is it possible to use the Name field to calculate an email address?

    i.e. Something like: name[first] . name[last] @ domain . com


  • Phil Manger


    Are you able to assign a value to a radio button input? i.e.
    Strongly Agree = 5
    Agree = 4
    Neutral = 3
    Disagree = 2
    Strongly Disagree = 1

    And store the numerical value rather than the text version? This will allows us to calculate averages etc?



  • iliastt

    I've tried to solve my problem but with no success. So any help would be appreciated.
    I want, when someone fills his bank account ( in IBAN format ) to find the bank automaticaly. I know how the IBAN works. I need the 5th, 6th and 7th position of the string to recognise it.
    But it doesn't work.
    What I've done:
    I have 2 fields. "IBAN" and "Bank".
    My condition is: if "IBAN" starts with (target value) @@## 011
    DO calculate a field's value Summary "Bank"

    The "IBAN" field is masked @@## #### #### etc

  • Jolt_Technology

    To automatically check multiple values into a multiple-choice field, paste the text of each answer you would like to be checked into the field, separated by a comma.

    Adding here in case it saves someone else time!

  • CHVforms

    when I attempt to auto-generate emails on my form, the text fields will not accept any text.
    Here is my form
    any help would be greatly appreciated.


  • Zen76

    I'd like to have in my form a question that asks for the state of the driver's license. I imagine it would be just a single selection question. I would like there to be a condition that requires the person completing the form to enter a format that aligns with each state's Driver's License number format.

    For instance, in Colorado, only 9 numbers are used. So first I would like them to answer a question asking which state. After selecting Colorado, I would another question to pop up that asks for the Driver's License number and requires 9 numbers (doesn't allow shorter or longer responses, and doesn't allow letters or other symbols).

    Is this possible?

  • Feestverhuur

    Each answer in my form is equal to a certain value.
    At the end of the form the score is calculated.
    I have 4 different explanations for the scores from 0-7, 8-15, 16-24 and 25-35.

    Is it possible to link a textbox to the field with the score,
    so that just one of the 4 explanations becomes visible in that textbox for the given values above?
    Thanks in advance.

  • SBVA

    How do the following: I have two fields
    1. Class Level - which is a radio button with values Level1, Level2, Level3, Level4 and Level5
    2. Class Time: - Also a radio button with values 1:30-3:00 and 3:00-430;

    So depending upon Class Level the user selects, I would like to disable the value of Class Time; For example,
    For Level1, and Level2 - both times are enabled;
    For Level3 - only 1:30-3:00 is enabled;
    For Level4, and Level5 - only 3:00-4:30 is enabled

    Can this be accomplished?


    Is it possible to use the comma-seperated values on the form calculation widget?

  • jmmorin

    Can you redirect based upon the generated URL? So when you hit submit you would be taken to: in the example above.

  • groundtruth

    I'm trying to generate a URL string that contains square brackets, but the form removes them after I hit Save.