This topic is locked

Custom Validate onchange

8/19/2009 8:53:11 AM
PHPRunner General questions
rjks author

Hi Support,
I am trying to insert an onchange() in the online add/edit to check before the input is saved. I have tried adding the the js to the visualeditor and also in the template file no luck so far.
Question:
where must I insert the onchange() by inline edit/add ?
As an example I have a field Date with date selector which must be greater than a given date.

Wher di I put the onchange() to check the date?
thanks in advance
Robert

rjks author 8/20/2009

Hello Support,
any joj on this?
Using the after add doesn´t seem to word either. It seems to be a general refresh Problem when using inline add/edit
again thanks in advance for any help.
Robert

J
Jane 8/20/2009

Robert,
unfortunately onchange event won't work for Inline edit/add.

rjks author 8/20/2009

Hello Jane,
is it possible to use the validate function with a new type i.e. maxdate which checks the input in a date field?
If so where and how?
Robert

J
Jane 8/21/2009

Robert,
you can use custom validation (Regular expression option on the "Edit as" settings dialog).

rjks author 8/24/2009

Hi Jane,
I´m using PHPR 5.0 build 689.
I don´t have Custom Validation!
Any other way possible as I have a lot of custom code in this version.
Thanks

J
Jane 8/24/2009

Robert,
unfortunately there is no easy way to add custom validation in PHPRunner 5.0 directly.

You can edit generated include/validate.js file manually or check entered values in the Before record added event.