I have this code in my Form.php
$this->add(array(
'name' => 'unidades_andar',
'type' => 'number',
'attributes' => array(
'class' => 'form-control',
),
));
And this in my view.phtml
<?php echo $this->formElement($form->get('unidades_andar')); ?>
And when I try to submit the form, I have this error:
Array ( [unidades_andar] => Array ( [isEmpty] => Value is required and can't be empty ) )
I already tried to set "required => false".
And if I change the type to TEXT instead of NUMBER, it works.
But why can't I use the type number? It seem to always be required...