Hi,
I have a Form with dynamicly created fields.
Therefore the attributes in my CFormModel have to be created dynamicly to!
This is how my formFields are created ($i=10 is just an example, the value of $i could be any number):
<?php
class XForm extends CFormModel {
// Static Attributes
public $xxxx;
// Validation here...
// Create TextFields for Form with "new" attributes
public function getTimeDateFields($form, $model)
{
$outputString = '';
for($i = 0; $i <= 10 ; $i++)
{
$outputString .= '<div>'.$form->textField($model,'FIELD_'.$i).'</div>';
}
return $outputString;
}
?>
[b]How do I assign these new properties to the CFormModel?
How do I assign validation rules to these new properties?[/b]
I already experimented with __GET __SET, but had no success
THX
Andreas