[dev] form: num & size issues

Marko Djukic marko at oblo.com
Wed Aug 13 19:36:35 PDT 2003


Quoting steve <mailling at gmx.co.uk>:

> Hello,
>
> I would like to use the Form.php API with the 'int' type. ie.
> $attributes['socialsecurity'] = array(
>      'label' => _("Social security number"),
>      'type' => 'int',
>      'required' => false
> );
>
> But I don't get the good size in the <input tag>
>
> I think we need to change the following functions in lib/Form/Renderer.php:
> _renderVarInput_number
> _renderVarInput_int
>
> Maybe the option could be inserted like this?:
> $attributes['socialsecurity'] = array(
>      'label' => _("Social security number"),
>      'type' => 'int',
>      'required' => false,
>      'params' => array('size' => '9')
> );
>
> Do you have any idea how to di it or implement it?
>

you might also have a look at the plain "text" field type, which also has a
regex param and can set the size/maxlength params to the html input.

marko


More information about the dev mailing list