Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Autoría | Ultima modificación | Ver Log |

<?php

declare(strict_types=1);

namespace LeadersLinked\Form\Transaction;

use Laminas\Form\Form;

class FundsAddForm extends Form 
{
    public function __construct()
    {
        parent::__construct('form');

        $this->setInputFilter(new FundsAddFilter());
        $this->setAttribute('method', 'post');
        
        $this->add([
            'name'   => 'description',
            'type' => 'Laminas\Form\Element\Text',
            'attributes' => [
                'id'            => 'description',
                'placeholder'   => 'LABEL_DESCRIPTION',
                'required'      => 'required',
                'autocomplete'  => 'off',
                'maxlength'     => '50',
            ],

        ]);

        $this->add([
            'name'          => 'amount',
            'type' => 'Laminas\Form\Element\Select',
            'attributes' => [
                
                'id'            => 'amount',
                'placeholder'   => 'LABEL_AMOUNT',
                'class'         => 'form-control',
                'required'      => 'required',
                'autocomplete'  => 'off',
                'maxlength'     => '5',
                
            ],
        ]);
        
        
        $this->add([
            'name' => 'amount',
            'type' => \Laminas\Form\Element\Select::class,
            'options' => [
                'empty_option' => 'LABEL_AMOUNT',
                'value_options' => [
                    '5' => '5 LABEL_USD',
                    '10' => '10 LABEL_USD',
                    '15' => '15 LABEL_USD',
                    '20' => '20 LABEL_USD',
                    '25' => '25 LABEL_USD',
                    '50' => '50 LABEL_USD',
                    '75' => '75 LABEL_USD',
                    '100' => '100 LABEL_USD',
                    
                ]
            ],
            'attributes' => [
                'id' => 'type',
            ]
        ]);
    }
}