Validate server side
Posted: Tue Oct 30, 2012 2:42 am
I have this code in Custom Code > Javascript:
The code is executed and I can see the app_aps_id changing value.
Then I insert this in Before Save to check data server side:
But after record is saved the new value is ignored.
Maybe I missed something?
Code: Select all
var todo = document.getElementById('app_todo').value;
var hstart = document.getElementById('app_hstart').value;
var hend = document.getElementById('app_hend').value;
if (todo && hstart && hend) {
document.getElementById(fieldName).value = '1504a5e1ca9115';
}
Then I insert this in Before Save to check data server side:
Code: Select all
define("DA_FATTURARE","1504a5e1ca9115");
$todo = $_POST["app_todo"];
$hstart = $_POST["app_hstart"];
$hend = $_POST["app_hend"];
if (($todo != '') && ($hstart != '') && ($hend != '')) {
$_POST["app_aps_id"] = DA_FATTURARE;
}
Maybe I missed something?