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 the substring widget be used to split a string?

    Asked by bbrett on June 23, 2017 at 05:49 AM

    I understand it can copy based on the character count, i.e. from 0-3 would copy the first four characters of the string.

    In my case I'd want it to copy all of the substring text up until a % for example?

  • Profile Image
    JotForm Support

    Answered by Jim_R on June 23, 2017 at 08:32 AM

    Sadly, there's no way to achieve what you're describing. You're correct with your understanding that the Substring Widget is used that way (e.g. set a start and end position).

    From how you described it, you're looking for a way to split a string once it encounters a certain character (e.g. a %). This can't be done within JotForm but you can do this with the help of your developer.

    Just have him grab the form's Full Source Code > deploy it on your page > then programmatically add a script to split a field using Javascript.

    https://www.w3schools.com/jsref/jsref_split.asp