AutorÃa | Ultima modificación | Ver Log |
<?php
declare(strict_types=1);
namespace LeadersLinked\Form\Microlearning;
use Laminas\Form\Form;
use LeadersLinked\Model\MicrolearningAnswer;
class AnswerCreateOrEditForm extends Form
{
public function __construct()
{
parent::__construct();
$this->setInputFilter(new AnswerCreateOrEditFilter());
$this->add([
'name' => 'text',
'type' => \Laminas\Form\Element\Textarea::class,
'attributes' => [
'id' => 'text',
]
]);
$this->add([
'name' => 'correct',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'empty_option' => 'LABEL_ANSWER_CORRECT',
'value_options' => [
MicrolearningAnswer::CORRECT_YES => 'LABEL_YES',
MicrolearningAnswer::CORRECT_NO => 'LABEL_NO',
]
],
'attributes' => [
'id' => 'correct',
]
]);
$this->add([
'name' => 'points',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'maxlength' => 3,
'id' => 'points',
]
]);
}
}