Page::getFormData([$name])
Version 2018.3
Get original data sent with the form
Version 2018.3
Get original data sent with the form
Get all data sent with the form to save this page. May include data outside the page itself, for example values that are modified in Tab.
Array
Add extra value to form data:
$txt .= "<input type='hidden' name='tallenna[my_data]' />";
Handle form data:
function onSaveInit(){
$data = $this->getFormData();
if ( array_key_exists('my_data', $data) ){
// Play with $data[my_data]
}
}
Or use isFormData()
function onSaveInit(){
if ( $this->isFormData('my_data') ){
// Play with $this->getFormData('my_data');
}
}