Page 1 of 1

How to append message on Add page error message?

Posted: Sun May 19, 2019 3:18 pm
by rafee

I wanted to check values entered on Add page then use the existing error like: "Please enter required field"

I want to append a message like : "Please refer to the manual...etc "

This is in Row_Inserting event.

I can use Form_CustomValidate BUT because sometimes I'll need to compare or UPDATE directly the values entered using &$rsnew variable.


Re: How to append message on Add page error message

Posted: Sun May 19, 2019 5:36 pm
by mobhar

You may replace it by using "setPhrase" method that belongs to the Language object in "Page_Load" server event that belongs to the Add Page, for example:

Language()->setPhrase("EnterRequiredField", "Please refer to the manual...etc ");

If you would like also to replace the phrase that used by the form validation code that generated by PHPMaker, then you may also use this code in the same server event above:

// Change YourFieldName to your actual field name
$this->YourFieldName->RequiredErrorMessage = "Please refer to the manual...etc ";