Limited Characters in External Form

Permalink
Hey there,
i'm building an external form and in some of the input fields i need a character-limitation so you can only enter one number.
<?php echo $form->text('tag_1'); ?>

I really don't know how to set the maxlength.

any ideas? :D

difference
 
hutman replied on at Permalink Best Answer Reply
hutman
You can do it like this:

echo $form->text('tag_1', null, array('maxlength' => 1));


Here is the 5.6 documentation for form widgets, I believe it's mostly the same for 5.7http://legacy-documentation.concrete5.org/developers/forms/standard...
difference replied on at Permalink Reply
difference
oh yeah!
thank you very much!!