There are 3 things that determine the browser characteristics of an inputText field, and they are the same as those for the regular HTML INPUT tag, since that's what gets generated.
The maxlength attribute determines the maximum number of characters that the field will be allowed to hold. Once that limit is reached, the browser should refuse to accept any more, and might even flash or beep or something to provide user feedback. Whether it does any of the preceding is dependent on what brand and version of browser is being used.
The size attribute estimates the physical size of the displayed text control based on character count. size can be less than, equal, or greater than maxlength. It will not control what the user can input - if maxlength is enforced, you might have plenty of free space in the control, but the browser would refuse to accept text. Conversely, the text may not all be visible if the size attribute is smaller than the amount of text in the control. My experience has been that size is only approximate in my favorite browsers, but for variable-width fonts, it would have to be.
The CSS width property also can control the displayed size, but more precisely.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Dec 04, 2006
Thanks Tim. But the solution with the code will be more welcome. Please help.