AnsweredAssumed Answered

field validation that also cancel "save" button in the Edtview

Question asked by Asaf Army on Aug 18, 2015
Latest reply on Aug 26, 2015 by Asaf Army
i want to perform a field validation on a certain field, that also canceles the "save" of an Editview.

a call to javascript, when the focus leaves the field is not enough because the javascript do not prevent the user from entering a wrong value in the field and then push "save" while the focus is still inside the field.

i need to do a field validation that gives an error message, when pushing "save" in the Editview while keeping the data entered in the editview fields.

also canceling the save by using a logic hook that calls:
SugarApplication::redirect('index.php?module=Contacts&action=EditView&record='
. $bean->id);
is not good , because i lose the data inside the editview fields.

how can i do a field validation that alerts the wrong data in the field after pushing "save" in the editview without losing the data?

sugarcrm already does that for entering characters inside a "integer" field. how do i do that too but with my own validation formula?

using CE 6.5.13 version.

Outcomes