Warning: array_merge(): Argument #1 is not an array in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 189

Warning: array_merge(): Argument #1 is not an array in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 189

Warning: array_merge(): Argument #1 is not an array in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 189

Warning: array_merge(): Argument #1 is not an array in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 189

Warning: array_merge(): Argument #1 is not an array in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 189

Warning: array_merge(): Argument #1 is not an array in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 217

Warning: Invalid argument supplied for foreach() in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 222

Warning: array_merge(): Argument #1 is not an array in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 217

Warning: Invalid argument supplied for foreach() in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 222

Warning: array_merge(): Argument #1 is not an array in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 217

Warning: Invalid argument supplied for foreach() in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 222

Warning: array_merge(): Argument #1 is not an array in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 217

Warning: Invalid argument supplied for foreach() in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 222

Warning: array_merge(): Argument #1 is not an array in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 217

Warning: Invalid argument supplied for foreach() in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 222

Warning: array_merge(): Argument #1 is not an array in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 217

Warning: Invalid argument supplied for foreach() in /usr/websites/web01499/www.delfs.dk/projects/Form/Form.php on line 222
* Gender
Newsletter Yes


<?php
require_once 'Form.php';

$form = new Form(array('action' => basename(__FILE__), 'method' => 'GET'));

$form->addElement('Name''text''name''''''/^[a-z]+ [a-z]+$/i');
$form->addElement('Adress''text''adress');
$form->addElement('Postal''text''postal''''''number''Hey - a legal number please!');

$options = array(=> '''Male' => 'male''Female' => 'female');
$form->addElement('Gender''select''gender'$options, array('size' => 1), 'required');

$elements[] = $form->getElement('Yes''radio''newsletter''yes', array('checked'));
$elements[] = $form->getElement('No''radio''newsletter''no');
$form->addElementGroup('Newsletter'$elements);

$form->addElement('''submit');

if (
$form->validate()) {
    echo 
"Form is submitted and validated!";
} else {
    echo 
$form->getJs();
    
$form->display();
}

echo 
"<br/><br/>\n";
show_source(__FILE__);
?>