|
|
Řádka 1: |
Řádka 1: |
− | # Same as before
| + | <html> |
− | public function execute($par) {
| + | <body> |
− | $this->setHeaders();
| + | |
− |
| + | <form action="new_page.php" method="post"> |
− | # A formDescriptor Array to tell HTMLForm what to build
| + | Nová stránka: <input type="text" name="name"><br> |
− | $formDescriptor = array(
| + | <input type="submit"> |
− | 'simpletextfield' => array(
| + | </form> |
− | 'label' => 'Simple Text Field', # What's the label of the field
| + | |
− | 'class' => 'HTMLTextField' # What's the input type
| + | </body> |
− | )
| + | </html> |
− | );
| + | |
− |
| + | |
− | $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
| + | |
− | }
| + | |