Nová stránka: Porovnání verzí

Z Wiki PedF UK
Přejít na: navigace, hledání
Řá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
+
}
+

Verze z 16. 11. 2014, 14:31

Nová stránka: