Using Javascript check/uncheck all button to work on SiteOrigin contact form widget
Hello,
I’m using the contact form widget to have people select some services they’d like to know more about from a checkbox list of around 5 services. At the bottom of the list, i’d like to have the button “check all” and the button “uncheck all”, to let them check or uncheck all services. Ideally, when the users clicks on the “send” button to send the message, I should receive an email with this selection, just like it works now if you manually select each service.
I’ve added a .js file into the wp-includes/js directory, and I’m trying to call this action from a Plain Text widget that I inserted under the Contact Form Widget. The buttons don’t show up, and the “recall” script I inserted into the Text widget gets changed in a weird way each time I save the page.
I’m not a Java developer and not familiar with this, so I must be doing something very wrong and hopefully someone could help me with a step-bystep-for-dummies instructions to achieve this. Thank you!!!
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
2Hi Archware.
I suspect the issue with the JavaScript and the text widget is due to how the text widget handles JavaScript now. I would recommend installing Add Paragraphs Option to Text Widget which will revert the text widget to how it was before WordPress 4.8 – a simple text area. Once activated, please open the text widget and untick Automatically add Paragraphs and save. How does that look?
Please note that I do not recommend that you add any files to wp-includes/js as upon WordPress update your changes will be lost. I would instead recommend adding them via a child theme.
I’d like to help you with this issue further, but unfortunately, this is beyond the scope of the support we’re able to offer on our free forums. There is a fair amount of custom work involved. I would recommend hiring a WordPress developer from Codeable to help you with this. They’ll charge you an hourly rate for any work done.
Thanks,
I’ll keep you informed on how this works.Thank you for your support, really appreciated!
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.