Validation plugin ignores 'Condition'

Bauer

Well-Known Member
I have a databasejoin dropdown element that is using the isnot validation plugin to check that the value is not zero.

I had also set the form to 'Toggle Submit'. I only need that to occur when new - so I wrote some php code for the 'Condition' statement in the validation plugin so as to to return false. But that doesn't work - the submit button remains dimmed.

I even tried changing the 'Condition' to "return false;" just to test. (And if I unpublish the validation plugin, the submit button shows, of course)

So the 'Condition' for the validation plugin is always ignored and the submit button is always dimmed if I use the 'Toggle submit' form setting.

This is not the same issue mentioned here - but this might be a good time to think about fixing this issue too...
'Must Validate' always dims Save button
 
I can't replicate this:

https://www.screencast.com/t/dbjFb2TEb

As you can see, initially I test with a notempty on a join element, with no condition ... and the Toggle Submit behaves as expected. When the AJAX validation fails, the submit button is disabled, and re-enables when validation passes. Then I added a "return false" as the condition (meaning that the validation is never going to run, and always pass validation) and again, it behaves as expected - the AJAX validation never fails, the submit button never gets disabled.

-- hugh
 
We are in need of some funding.
More details.

Thank you.
Back
Top