Contents |
ValidForm→getValidField
ValidForm→getValidField — Get the object of a specific validated field.
Description
getValidField (string $fieldId);
Get the object of a specific validated field.
Parameters
- fieldId
The HTML id of the field you want to get the data from
Return values
Returns specific field object if valid.
Examples
$objForm = new ValidForm("testForm", "Heading text");
$objHello = $objForm->addField("hello","Hello there",VFORM_STRING);
$objValidHello = $objForm->getValidField("hello"); // "hello" is the form ID
//*** Now you can compare objects or do whatever you want with the validated object.
if($objValidHello == $objHello){
echo "This is cool.";
}

