function loadFromSession()
Load data and errors from the session, with optional record id validation
Expected session keys:
record_id Checked against $verify_record_id, session data is thrown away in case of mismatch
field_values Field data, loaded using Form::setData
field_errors Field errors, loaded using Form::setErrors Usagenull|array Form::loadFromSession ( string $key [, mixed $verify_record_id ] ); Example$data = Form::loadFromSession('register');
if (empty($data)) {
$data = $this->add_defaults;
Form::setData($data);
} Arguments- string $key
Session key to get values from - mixed $verify_record_id = NULL
For edit record verification
Return value- array
Loaded session data - null
No session data found
|