?? GreyFile — Mystic File Browser

Current path: home/webdevt/cryptoimpot.fr/module/Application/src/Form/



?? Go up: /home/webdevt/cryptoimpot.fr/module/Application/src

?? Viewing: SearchForm.php

<?php

namespace Application\Form;

use Laminas\Form\Form;
use Laminas\Form\Element\Text;
use Laminas\Form\Element\Button;

class SearchForm extends Form
{
    public function __construct()
    {
        parent::__construct('search-form');
        
        $this->setAttribute('method', 'get');
        
        // Search
        $element = new Text('search');
        $element->setLabel('Search')
                ->setAttribute('id', 'search-input')
                ->setLabelAttributes(array(
                    "class" => "control-label"
        ));
        $this->add($element);
        
        
        // Submit
        $submitElement = new Button('submit');
        $submitElement
                ->setLabel('Submit')
                ->setAttributes(array(
                    'type' => 'submit',
        ));

        $this->add($submitElement, array(
            'priority' => -100,
        ));
    }
}


??

??