Buy Now
Sign in

designer events tutorial

emmexx , July 27 2016
e
emmexx

Is there a tutorial on how to use the designer events found on designer events tab?

Otherwise, is there a cfv5 tutorial or faq on enabling/disabling validation for some field?

Thank you
maxx

GreyHead

Hi Maxx,

There's no tutorial that I know of :-(

What exactly do you need to do? Sometimes you can turn validation on and off by disabling or hiding the input. Unfortunately the validations are set when the form loads and I haven't found a way to change them after that. When I need to do so I have switched to using the jQuery validation library which offers more control.

Bob

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much

e
emmexx

In part it is curiosity: it is there but I don't know what to do with it.
I tried to debug the code generated by a disable/enable validation but I couldn't get it to work. And what you wrote (the validations are set when the form loads) is in contrast with what I understand from the code.
The event adds js code like

				(...).on('change', function()...
				
so I expected to see that code executed when a select o input radio changes. But in firebug nothing happens.

Anyway I was looking for a simple way to change the required fields based on the value of another field. I did this in CFv4 but now it is more complicated, probably adding/removing the validation[required] class is not enough, the required marker must be managed and so on. I suppose I should check the classes used by cf and manage them using js. But I'm lazy. ;)

But a method to manage validation based on other fields values would be a very useful feaure in CF.

Thank you
maxx

GreyHead

Hi Maxx,

You can run a function onChange - the problem is that, at that point, changing the class doesn't change the validation as that was set when the form loaded.

Bob

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much

GreyHead

Hi Maxx,

You can run a function onChange - the problem is that, at that point, changing the class doesn't change the validation as that was set when the form loaded.

Bob

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much