Global Script to validate field

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

Global Script to validate field

Post by Bernie »

Greetings.
I am validating a field with a function in:

Database > Table > Field > Edit Tag > Validation > Validate: myFunction

myFunction is declared on:

Client Scripts > Global > Pages with header/footer > Global Code

The thing is every time I copy the .pmp file and open it with the PHPMaker I just can't type/select myFunction in the combo box for the validation. It shows myFunction there and generates the code, but I just wonder if there's a workaround for it.

I am working with PHPMaker v9.2.0.


mobhar
User
Posts: 11905

Post by mobhar »

Do you mean you want to validate the field which is represented by Combobox control? In other words, what control that used by that field in your form? Is it a Textbox (Input type) or Combobox (Select type)?


danielc
User
Posts: 1599

Post by danielc »

Is it mean that only the copy project file can not select your [Custom validation functions] while your original project can select? Are your generated scripts contain your validation function?

I copy the project file but I can select. Have you tried to use [save a copy] to see if your project can select your [Custom validation functions]?

Also, make sure your function has put into [Tools]->[Advanced Settings]-> [Custom validation functions].


Bernie
User
Posts: 17

Post by Bernie »

mobhar and danielc, once again, thanks for the help.
I validate a text field.
I will try to SAVE AS my projects from now on, that must be one of the problems.
I solved the issue with the [Tools]->[Advanced Settings]-> [Custom validation functions] suggestion you just gave me.
Best regards, and keep making this such a great forum to get answers and help.


Bernie
User
Posts: 17

Post by Bernie »

Forgot to answer, yes, on the copied project I can't select the functions but the generated script from that same project do generate the code correctly with the validation.


Post Reply