|  | Posted by Phil Latio on 08/24/07 14:05 
Still having fun trying to build the perfect form and validation classes and wondered if anyone can help on the following.
 
 In the following function, how can I make $validationparameters an array so
 it can accept multiple values that I can iterate through? Don't need the
 iteration part (yet).
 
 function setField($type, $name, $value, $style, $label,
 $validationparameter)
 {
 $this->number_of_fields++;
 $this->fields[] = array('type'=>$type, 'name'=>$name, 'value'=>$value,
 'style'=>$style, 'label'=>$label,
 'validationparameters'=>$validationparameters);
 }
 
 This is part written function that I will use to pass the multiple values to
 the array.
 
 function setValidationParameters($number, $parameter)
 {
 $this->fields[$number][validationparameter] = $parameter;
 }
 
 I am beginning to confuse myself and wondering if anyone can add some sanity
 to what I am doing.
 
 Cheers
 
 Phil
  Navigation: [Reply to this message] |