AutorÃa | Ultima modificación | Ver Log |
<?php
declare(strict_types=1);
namespace LeadersLinked\Form\Survey;
use Laminas\Form\Form;
use Laminas\Db\Adapter\AdapterInterface;
use Laminas\Log\LoggerInterface;
use LeadersLinked\Mapper\CompanySizeMapper;
use LeadersLinked\Mapper\SurveyFormMapper;
use LeadersLinked\Model\SurveyForm;
class SurveyFormForm extends Form
{
/**
*
* @param AdapterInterface $adapter
* @param int $company_id
*/
public function __construct($adapter, $company_id)
{
parent::__construct();
$this->setInputFilter(new SurveyFormFilter($adapter));
$this->add([
'name' => 'name',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'maxlength' => 128,
'id' => 'name',
]
]);
$this->add([
'name' => 'text',
'type' => \Laminas\Form\Element\Textarea::class,
'attributes' => [
'id' => 'text',
'maxlength' => 1024,
],
]);
$this->add([
'name' => 'status',
'type' => \Laminas\Form\Element\Checkbox::class,
'attributes' => [
'id' => 'status',
],
'options' => [
'use_hidden_element' => false,
'unchecked_value' => SurveyForm::STATUS_INACTIVE,
'checked_value'=> SurveyForm::STATUS_ACTIVE,
]
]);
$this->add([
'name' => 'content',
'type' => \Laminas\Form\Element\Textarea::class,
'attributes' => [
'id' => 'content',
]
]);
}
}