Drezard Posted February 13, 2007 Share Posted February 13, 2007 Hello, Im making a HTML Form that i want the different fields to have a maximum and a minimum value. How do I do this: <form action='' method='post'> User name: <input type='text' name='user'> Password: <input type='password' name='pass'> <input type='submit' name='submit'> </form> Now I want the text box for the user field to be at least 150 letters so the text box is much larger. What would be the code for it? - Cheers, Daniel Link to comment https://forums.phpfreaks.com/topic/38381-html-form-max-value/ Share on other sites More sharing options...
paul2463 Posted February 13, 2007 Share Posted February 13, 2007 <form action='' method='post'> User name: <input type='text' size="150" name='user'> Password: <input type='password' name='pass'> <input type='submit' name='submit'> </form> Link to comment https://forums.phpfreaks.com/topic/38381-html-form-max-value/#findComment-184007 Share on other sites More sharing options...
fenway Posted February 13, 2007 Share Posted February 13, 2007 I don't remember... is this respected in the POST and/or JS? Link to comment https://forums.phpfreaks.com/topic/38381-html-form-max-value/#findComment-184036 Share on other sites More sharing options...
ToonMariner Posted February 14, 2007 Share Posted February 14, 2007 I don't believe you can set the minimum length of an input field - you can set maxlength for text boxes but little else - even then it can be circumvented easily. This is a situation wher data validation should really be conducted in a server side script - possibly a bit of javascript to validate before submitting but even that can be hood winked or turned off so the server side validation is a must IMO. Link to comment https://forums.phpfreaks.com/topic/38381-html-form-max-value/#findComment-184192 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.