Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re initialization after adding dynamic inputs #34

Closed
hectorAmaral opened this issue Oct 15, 2015 · 3 comments
Closed

Re initialization after adding dynamic inputs #34

hectorAmaral opened this issue Oct 15, 2015 · 3 comments

Comments

@hectorAmaral
Copy link

Hi guys.

Is there a way to refresh the plugin once it is initialized?
I'm trying to add some dynamic inputs on my form, but realTime validation is not working on new inputs,
and if I call again $('form').validetta({..}) it creates multiple instances of validetta class (new Validetta( this, options )), so I'm getting multiple onValid and onError methods for each instance.

Hope you can help.
Thanks.

@hsnaydd
Copy link
Owner

hsnaydd commented Oct 16, 2015

Hi @hectorAmaral
Validetta does not support external access yet, but Im working on it. Probably you can do this with v2.0.0

@arfa2
Copy link

arfa2 commented Sep 15, 2016

I am not sure exactly what you are after but here is something I extracted from my current work...
http://bodhinyanarama.net.nz/temp/dynamicFields.htm
You can put anything in the $("#prevInfo").html('...'); and adjust data collection accordingly.

The basic logic is to give validetta what is needs - an entry in the field.
I haven't tested it with checkboxes or radio but the principle seems workable - could even be a hidden input that is checked for the 'no' scenario.

I hope this might be of use.

@hsnaydd
Copy link
Owner

hsnaydd commented Oct 20, 2016

This can be followed #44.

@hsnaydd hsnaydd closed this as completed Oct 20, 2016
@hsnaydd hsnaydd mentioned this issue Oct 20, 2016
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants