Print Page | Close Window

How to limit length of text input field

Printed From: Forum openElement
Category:

openElement


Forum Name: openElement General Discussion
Forum Description: A place for general discussion and questions about the software.
URL: http://forum.openelement.com/fr/forum_posts.asp?TID=1852
Printed Date: 17 Sep 2021 at 18:03
Software Version: Web Wiz Forums 10.11 - http://www.webwizforums.com


Topic: How to limit length of text input field
Posted By: TC2020
Subject: How to limit length of text input field
Date Posted: 03 Juil 2021 at 06:55
Hi,

I would like to know how to limit the number of characters in a text input field as well as how to set its width to match the string.

Currently, I define the width of the input field using pixels. I then preview the page, enter some text and count the number of characters. I repeat this process until the width is about right. With this, I can still type in the field and text scrolls to the left. What I would like to achieve is limit this length (say, 24 characters) and the field would stop accepting input after this count. I would like to use this as field validation.

Thank you.



Replies:
Posted By: Hobby001
Date Posted: 03 Juil 2021 at 12:52
https://zupimages.net/viewer.php?id=21/26/m6fw.png" rel="nofollow">

-------------
https://denislafrance.net/index.en-us.htm" rel="nofollow - Anyone who wants to put something on line gets hooked by something big


Posted By: Hobby001
Date Posted: 03 Juil 2021 at 13:04
If it is for multi lines text input you will need javascript

https://www.mediacollege.com/internet/javascript/form/limit-characters.html" rel="nofollow - https://www.mediacollege.com/internet/javascript/form/limit-characters.html




-------------
https://denislafrance.net/index.en-us.htm" rel="nofollow - Anyone who wants to put something on line gets hooked by something big


Posted By: TC2020
Date Posted: 04 Juil 2021 at 06:29
Great, thank you.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 10.11 - http://www.webwizforums.com
Copyright ©2001-2012 Web Wiz Ltd. - http://www.webwiz.co.uk