Nová stránka
Z Wiki PedF UK
Verze z 16. 11. 2014, 13:28; Administrator (diskuse | příspěvky)
- 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
}