getValue() public method

Extracts current value from form.
public getValue ( SelectorInterface $selector ) : string/array
$selector SelectorInterface Criteria to apply.
return string/array
 function testMultipleFieldsWithSameKey()
 {
     $form = new SimpleForm(new SimpleFormTag(array()), new SimpleUrl('htp://host'));
     $form->addWidget(new SimpleCheckboxTag(array('name' => 'a', 'type' => 'checkbox', 'value' => 'me')));
     $form->addWidget(new SimpleCheckboxTag(array('name' => 'a', 'type' => 'checkbox', 'value' => 'you')));
     $this->assertIdentical($form->getValue(new SimpleByName('a')), false);
     $this->assertTrue($form->setField(new SimpleByName('a'), 'me'));
     $this->assertIdentical($form->getValue(new SimpleByName('a')), 'me');
 }