Skip to content

Instantly share code, notes, and snippets.

@tedkulp
Created March 7, 2011 12:40
Show Gist options
  • Save tedkulp/858451 to your computer and use it in GitHub Desktop.
Save tedkulp/858451 to your computer and use it in GitHub Desktop.
$form = new \silk\form\Form('blah');
$fs = $form->addFieldSet('blah', array('legend' => 'Config Options'));
$fs->addField('TextBox', 'thing');
$form->addButton('Submit');
$form->addButton('Cancel', array('value' => 'Get Me Out of Here!'));
if ($form->isPosted()) //Checks and then fills in values from POST
{
if ($form->getClickedButton() == 'Submit')
{
echo $form->getValue('thing');
}
}
echo $form->render();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment