Page 1 of 1

Global Script to validate field

Posted: Mon Sep 16, 2013 9:02 pm
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.


Re: Global Script to validate field

Posted: Tue Sep 17, 2013 9:50 am
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)?


Re: Global Script to validate field

Posted: Tue Sep 17, 2013 10:02 am
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].


Re: Global Script to validate field

Posted: Wed Sep 18, 2013 1:43 am
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.


Re: Global Script to validate field

Posted: Wed Sep 18, 2013 1:53 am
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.