How to append message on Add page error message?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
rafee
User
Posts: 34

How to append message on Add page error message?

Post 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.


mobhar
User
Posts: 11748

Post 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 ";


Post Reply