Nová stránka

Z Wiki PedF UK
Přejít na: navigace, hledání
  1. Same as before

public function execute($par) {

       $this->setHeaders();

       # A formDescriptor Array to tell HTMLForm what to build
       $formDescriptor = array(
                       'simpletextfield' => array(
                               'label' => 'Simple Text Field', # What's the label of the field
                               'class' => 'HTMLTextField' # What's the input type
                       )
       );

       $htmlForm = new HTMLForm( $formDescriptor, $this->getContext() ); # We build the HTMLForm object

       $htmlForm->setSubmitText( 'Allons-y gaiement' ); # What text does the submit button display

       $htmlForm->show(); # Displaying the form

}