- NeetaKapadiaAsked on December 11, 2011 at 06:26 AM
I have a field where I would like the user to enter only alphanumeric text without any space. How do I do that. Can you please let me know how to achieve that
- pinoytechAnswered on December 11, 2011 at 09:47 AM
Here's how you can set the validation for your text field:
1. Open your form
2. Click on the "user" text field
3. Click on "Properties: Name" on the top menu
4. Click on the "Validation" icon and set to "AlphaNumeric"
Hope this will help you. Thank you for using JotForm!
- JotForm SupportidarktechAnswered on December 11, 2011 at 09:58 AM
Unfortunately, we don't have direct tool for no space validation but If you like, you can try this workaround. In order to achieve that you need to download your form's full source code, here's a guide for that: http://www.jotform.com/help/104-How-to-download-a-source-code-of-your-form
After downloading your form's source code, open the html file (can be found on the downloaded form files).
On the html code, under <head> tag please add the code below:
alert('Sorry, you are not allowed to enter any spaces');
After that, add this code onkeyup="nospaces(this)" inside the Text Box code. (This should be the Text Box where you don't want to allow any spaces. Please see sample structure below.)
<input type="text" name ="textbox" id="textbox" onkeyup="nospaces(this)">
Here's sample demo: Click HERE
Let me know if you have further questions. Thanks.
- FahimAnswered on October 14, 2012 at 07:01 AM
Nice code. Thanks idarktech
- moonzkieAnswered on October 14, 2012 at 07:20 AM
In behalf of my colleague, we're glad to be of help, if you have further questions feel free to contact us.
Thanks for using JotForm!
- Anup ShajiAnswered on January 11, 2013 at 06:34 AM
Thankx idarktech... this was helpful....
- aarthy dAnswered on September 18, 2013 at 01:27 AM
- aarthyAnswered on September 18, 2013 at 01:30 AM
- munimohanAnswered on September 18, 2013 at 08:14 AM
- sushmaAnswered on October 01, 2014 at 02:27 AM
- sivaAnswered on February 11, 2015 at 12:59 PM
what is the meaning of symbols in code
please give the answer
- BenAnswered on February 11, 2015 at 02:04 PM
The code above is called regex code that is used to find and if found remove space characters from the text.
Now, as this is a very old thread, if you have any further questions in regards to this, please let us know by opening your own thread.
- thilinaAnswered on July 21, 2015 at 05:20 AM
- Yasir IhsanAnswered on August 18, 2015 at 04:11 AM
I was searching for the long time no one put executable code. Every person is misguiding. Thanks for the code it is 100% working and running fine on my page.
- FaisalAnswered on January 21, 2016 at 02:21 AM
Thanks Bro..Awesome It Is!
- pavanAnswered on March 28, 2016 at 07:47 AM
Thankyou it was helpful
- FarhadAnswered on November 13, 2016 at 01:08 AM
Thanks It's worked well
- JotForm SupportBJoannaAnswered on January 05, 2017 at 02:11 AM
I have moved your question to separate thread and we will provide you an answer there shortly.