Closed hotnunstar closed 8 months ago
Wheelform frontend is framework agnostic. Therefore, this check needs to be done by the developer using Javascript or through the templates.
I added a new isActive()
method to the FormService
on the templates. You can add it as an attribute to the form HTML.
{% set form = wheelform.form({id: 1}) %}
{{ form.open('', {
'data-form-active': form.isActive() ? '1' : '0',
}) }}
I hope this helps.
I'm using Craft 3.x so I needed to do the changes to an older plugin version but it works.
Thank you!
Hello.
I would like to know if it is possible to check if a form is inactive before submitting it.
If I use wheelformErrors, I only see information that the form is inactive after submission, but I wanted to prevent the user from filling in and submitting the form when it is inactive.