[eluser]stevefink[/eluser]
I'm trying to re-populate a form after one or more invalid data fields have been submitted. As per the validation user guide, I have the following in my controller:
Code:
$fields['stock'] = 'Stock';
$fields['vin'] = 'VIN';
$this->validation->set_fields($fields);
And the following in my view:
Code:
<label>Stock# <span class="required"> * </span></label>
<input type="text" name="stock" value="<?=$this->validation->stock;?>" /> <br>
<label>VIN <span class="required"> * </span></label>
<input type="text" name="vin" value="<?=$this->validation->vin;?>" /> <br>
If any part of the form is not properly submitted, shouldn't those two essentially get repopulated? Instead I get this within my view:
Severity: Notice
Message: Undefined property: CI_Validation::$stock
Filename: console/car_info_view.php
Line Number: 43
and
A PHP Error was encountered
Severity: Notice
Message: Undefined property: CI_Validation::$vin
Filename: console/car_info_view.php
Line Number: 46
Thank you.