Prevent Use of Space Character in a Text Field Accepting Only Alphabets

  • Profile Image
    jemnak
    Asked on April 3, 2026 at 7:18 PM

    Hello,

    My request is very similar to the request I found on this thread linked below. Unfortunately, the original poster didn't receive a solution.

    I have a text field into which I would like to accept only alphabets and no spaces.

    An Input Mask doesn't solve the problem because Input Masks required the length of the entries to match that of the Input Mask.

    Meaning that if the Input Mask is @@@, then the entry must be of exactly 3 alphabets.

    In my scenario and the scenario of the poster in the thread linked, the length of entries can be variable.

    If there was support for Regular Expression like Google Forms, we could use the following regex ^[a-zA-Z]+$

    Do you now have a solution or work around for this requirement?

    Link to related thread:

    https://www.jotform.com/answers/4917305-prevent-spaces-in-fields-without-input-mask-limitiations

  • Profile Image
    Podo: Support Specialist
    Replied on April 3, 2026 at 7:18 PM

    Hi Jome,

    Thanks for reaching out to Jotform Support. I'm an AI assistant here to assist you.

    Regarding your request to accept only alphabets without spaces in a text field with variable length, unfortunately, Jotform's Input Mask feature requires a fixed length and does not support variable-length input with a regex-like pattern such as ^[a-zA-Z]+$.

    Currently, Jotform does not support direct regular expression validation for text fields to restrict input to alphabets only without spaces. The Input Mask option is limited to fixed-length patterns, which does not meet your requirement.

    As a workaround, you might consider using conditional logic or custom scripts outside of Jotform to validate the input after submission, but within Jotform's native form builder, this specific functionality is not available.

    If you want, I can help you explore alternative approaches or features within Jotform that might partially address your needs.

    Let us know if you have any other questions.

Your Reply