Page 1 of 1

Require values in e-mail and text fields

Posted: Wed Mar 20, 2019 4:22 pm
by dimehb
Is there a possibility to make the e-mail and message fields required? Our users seem to be pretty lazy when they submit an error.

Re: Require values in e-mail and text fields

Posted: Wed Mar 20, 2019 5:39 pm
by mats
Not through the API I'm afraid. But you can get to the button iframe element and reach for the name field and add the 'required' attribute to it.

Code: Select all

logger.feedbackButton.el.querySelector('[name=name]').setAttribute('required', true);