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

Destroy fields before initialization #121

Open
Orlandster opened this issue May 2, 2018 · 1 comment
Open

Destroy fields before initialization #121

Orlandster opened this issue May 2, 2018 · 1 comment

Comments

@Orlandster
Copy link
Contributor

Is there a way to destroy and clear the values before the form gets initialized?

This is my code:

$form.garlic('destroy'); // destroy all fields
$form.garlic({ expires: lifetime * 60 }); // init garlic

The thing is all the fields get destroyed, but will still be visible. I need to reload the page to get the clean form. Is there a function to clear all form values?

Or mayby it should be manually possible to initialize garlic.

Thanks for taking the time!

@guillaumepotier
Copy link
Owner

Hi there,

I did not recall having set a clear form function into garlic. This is something I think you would have to implement yourself, web has plenty questions on that topic.

What is your use case, why do you need to do that?

Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants