Thank you for the ideas, will try to find time to get them added, hopefully for next update. Adding required attribute should be simple enough, not sure about browser notifications but definitely will take a look.
Just to follow up with this. I tried adding required
to the chat textarea. Testing in Chrome, it pops up a “Please fill out this field” alert after submitting every chat message. Probably similar behavior in other browsers.
So instead of hard-coding the required
attribute, I added a filter that can be used. Just add this code:
function sac_textarea_atts($atts) { return 'required'; }
add_filter('sac_textarea_atts', 'sac_textarea_atts');
That works to add any attributes not just required, as needed.
New version should be released within a couple of days. Thanks again for the feedback, @benbois.
Hi Jeff aka @specialk,
Thanks for your work.
You’re right, I didn’t pay attention to this alert message, it is indeed annoying!
The solution to add a nicer input styles seems to be somewhere else.
May be by using placeholder
.
I tried to implement browser notification in your code.
I got some results but notifications seem to not work if the browser is in background on mobile.
Hi Ben, that’s a good idea. If you want to share any code, feel free to send a quick email via my contact form. Thank you.
Thanks Ben, browser notifications are added to the next version of the plugin. Should be available later today.
Good news Jeff, thanks to have added it quickly!