You can control the visible length of the input textbox using CSS. You can apply a maximum length to the content in the textbox using the HTML attribute MAXLENGTH.
So add the attribute 'maxlength' => 12 to your form input statement in add.ctp. You should still apply validation to the input when saving the data, to ensure that the length is not more than 12, see validation in the CakePHP book! Enjoy John On Nov 12, 8:26 am, Jiran Simon <[email protected]> wrote: > Hii, > > In my program there is a field with data type VARCHAR(). In add.ctp it shows > very lenghty. I need the lenght of textbox maximum upto 12 character. How I > can reduce the length of the text field ? > > regards, > > jiru -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
