mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge branch 'master' of github.com:silverstripe/silverstripe-userforms
This commit is contained in:
commit
bb1c4d8043
@ -22,6 +22,7 @@ and without getting involved in any PHP code.
|
||||
* View submitted submissions and export them to CSV
|
||||
* Define custom error messages and validation settings
|
||||
* Optionally display and hide fields using javascript based on users input
|
||||
* Pre fill your form fields, by passing your values by url (http://yoursite.com/formpage?EditableField1=MyValue)
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -395,6 +395,11 @@ class UserDefinedForm_Controller extends Page_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
// set the values passed by the url to the field
|
||||
$request = $this->getRequest();
|
||||
$value = Convert::raw2att($request->getVar($field->name));
|
||||
if(isset($value)) $field->value = $value;
|
||||
|
||||
$fields->push($field);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user