Simple Form
A simple form.
<pinp>
$formFields = array(
'Name',
'Email',
'Password' => array(
'type' => 'password'
),
'agree' => array(
'type' => 'checkbox',
'checkedValue' => 1,
'label' => 'I agree to the terms of service.'
)
);
$formButtons = array( 'Register', 'cancel' => 'Another time' );
$form = ar('html')->form( $formFields, $formButtons );
if ( $form->isSubmitted('button_0') )
{
echo 'Registration complete, thank you.';
}
else if ($form->isSubmitted('cancel'))
{
echo 'Registration cancelled, see you later.';
}
else
{
echo $form->getHTML();
}
</pinp>