public function setup()
 {
     $this->frm = new SpoonForm('datefield');
     $this->txtDate = new SpoonFormDate('date', strtotime('Last Monday'), 'd/m/Y');
     $this->frm->add($this->txtDate);
     $_POST['form'] = 'datefield';
 }
 public function setup()
 {
     $this->frm = new SpoonForm('radiobutton');
     $gender[] = array('label' => 'Female', 'value' => 'F');
     $gender[] = array('label' => 'Male', 'value' => 'M');
     $this->rbtGender = new SpoonFormRadiobutton('gender', $gender, 'M');
     $this->frm->add($this->rbtGender);
 }
 public function setup()
 {
     $this->frm = new SpoonForm('button');
     $this->btnSubmit = new SpoonFormButton('submit', 'Submit', 'submit');
     $this->btnReset = new SpoonFormButton('reset', 'Reset', 'reset');
     $this->btnSpecial = new SpoonFormButton('special', 'Special', 'button');
     $this->frm->add($this->btnSubmit, $this->btnReset, $this->btnReset);
 }
 public function setup()
 {
     $this->frm = new SpoonForm('multicheckbox');
     $hobbies[] = array('label' => 'Swimming', 'value' => 10);
     $hobbies[] = array('label' => 'Cycling', 'value' => 20, 'attributes' => array('rel' => 'bauffman.jpg'));
     $hobbies[] = array('label' => 'Running', 'value' => 30);
     $this->chkHobbies = new SpoonFormMultiCheckbox('hobbies', $hobbies, array(10, 20));
     $this->frm->add($this->chkHobbies);
 }
 public function setup()
 {
     $this->frm = new SpoonForm('radiobutton');
     $gender[] = array('label' => 'Female', 'value' => 'F');
     $gender[] = array('label' => 'Male', 'value' => 'M');
     $this->rbtGender = new SpoonFormRadiobutton('gender', $gender, 'M');
     $this->frm->add($this->rbtGender);
     $numeric = array(array('value' => 1, 'label' => 'One'), array('value' => 1.5, 'label' => 'One And A Half'));
     $this->rbtNumeric = new SpoonFormRadiobutton('numeric', $numeric, '1');
 }
 public function setup()
 {
     $this->frm = new SpoonForm('dropdown');
     $this->ddmSingle = new SpoonFormDropdown('single', array(1 => 'Davy Hellemans', 'Tys Verkoyen', 'Dave Lens'));
     $this->ddmMultiple = new SpoonFormDropdown('multiple', array(1 => 'Swimming', 'Running', 'Cycling', 'Boxing', 'Slackin'), null, true);
     $this->ddmOptGroupSingle = new SpoonFormDropdown('optgroup_single', array('foo', 123 => 'bar', 'foobar' => array('foo', 'baz')));
     $this->ddmOptGroupMultiple = new SpoonFormDropdown('optgroup_multiple', array('foo', 123 => 'bar', 'foobar' => array('foo', 'baz')), null, true);
     $this->ddmDefaultElement = new SpoonFormDropdown('default_element', array(1 => 'Davy Hellemans'));
     $this->ddmDefaultElement->setDefaultElement('Baz', 1337);
     $this->frm->add($this->ddmSingle, $this->ddmMultiple, $this->ddmOptGroupSingle, $this->ddmOptGroupMultiple, $this->ddmDefaultElement);
 }
 public function setup()
 {
     $this->frm = new SpoonForm('filefield');
     $this->filePDF = new SpoonFormFile('pdf');
     $this->frm->add($this->filePDF);
     $_FILES['pdf']['name'] = 'My pdf.pdf';
     $_FILES['pdf']['type'] = 'application/pdf';
     $_FILES['pdf']['tmp_name'] = '/Applications/MAMP/tmp/php/phpDBDfyR';
     $_FILES['pdf']['error'] = 0;
     $_FILES['pdf']['size'] = 86592;
 }
 public function setup()
 {
     $this->frm = new SpoonForm('hiddenfield');
     $this->hidHidden = new SpoonFormHidden('hidden', 'I am the default value');
     $this->frm->add($this->hidHidden);
 }
 public function setup()
 {
     $this->frm = new SpoonForm('checkbox');
     $this->chkAgree = new SpoonFormCheckbox('agree', true);
     $this->frm->add($this->chkAgree);
 }
 public function setup()
 {
     $this->frm = new SpoonForm('passwordfield');
     $this->txtPassword = new SpoonFormPassword('name', 'I am the default value');
     $this->frm->add($this->txtPassword);
 }
示例#11
0
 public function setup()
 {
     $this->frm = new SpoonForm('textfield');
     $this->txtName = new SpoonFormText('name', 'I am the default value');
     $this->frm->add($this->txtName);
 }
示例#12
0
 public function setup()
 {
     $this->frm = new SpoonForm('timefield');
     $this->txtTime = new SpoonFormTime('time', date('H:i'));
     $this->frm->add($this->txtTime);
 }
 public function setup()
 {
     $this->frm = new SpoonForm('textarea');
     $this->txtMessage = new SpoonFormTextarea('message', 'I am the default value');
     $this->frm->add($this->txtMessage);
 }