If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
I have added a checkbox to the Corona contact form buy adding the following line in contact-form.php:
‘mailinglist’ => array(‘type’=>’checkbox’,’label’=>__(‘ Add me to the mailing list’,’avia_framework’), ‘check’=>”), //mailinglist
This up fine on the website. However, when I submit a form with the checkbox checked, it is always shown as “false” in the email it generates. Am I doing something wrong (I am very new to WordPress/HTML, etc.). Is there another field I need to set?
Need to also modify some jquery, but you were almost there. Please open /js/avia.js and look for line 1077. just add the checkbox in there as i have done below.
formElements: form.find('textarea, checkbox, select, input[type=text], input[type=hidden]'),
I hope that does the trick.
Also take out those few spaces in the code you posted that are inside the single quotes label.
The topic ‘Adding checkbox to Corona contact form’ is closed to new replies.