Cannot uncheck checkbox and submit
Hi,
I added a checkbox to a form using CSSFB. The form works ok and posts, then emails (using WA_UE) but won't work when the checkbox is unchecked.
Help!
Please see http://willadamsphoto.com/Copy_of_contact.php
Hi,
I added a checkbox to a form using CSSFB. The form works ok and posts, then emails (using WA_UE) but won't work when the checkbox is unchecked.
Help!
Please see http://willadamsphoto.com/Copy_of_contact.php
Hi Will,
You have an asterisk by the checkbox, is it a required field? (I would have thought it would have to be optional for a newsletter sign-up?)
First I tried it not required, and then required. Either way, it forced me to check to box to continue. The test page I referred to was required, but I reset it to not required. You will see the same behavior. See screenshot.
I think you should just remove all validation from the checkbox. The only bits you need to keep are the bits in blue below: The grey bits you don't need:
<div class="lineGroup">
<div class="fullColumnGroup">
<label for="Contact_WillAdamsPhoto_com_group_Get_updates_newsletter" class="sublabel" >Get updates/newsletter:<span class="requiredIndicator"> *</span></label>
<div class="errorGroup">
<div class="fieldPair">
<div class="fieldGroup"> <span id="Contact_WillAdamsPhoto_com_group_Get_updates_newsletter_Spry">
<label class="checklabel" for="Contact_WillAdamsPhoto_com_group_Get_updates_newsletter" onblur="hideServerError('Contact_WillAdamsPhoto_com_group_Get_updates_newsletter_ServerError');">
<input type="checkbox" name="Contact_WillAdamsPhoto_com_group_Get_updates_newsletter" id="Contact_WillAdamsPhoto_com_group_Get_updates_newsletter" value="1" class="formCheckboxField_Standard" checked="checked" tabindex="3" />
</label>
<span class="checkboxRequiredMsg"> </span> </span>
</div>
</div>
</div>
</div>
</div>
You should also remove the spry checkbox Validation widget from the bottom of the page:
var Contact_WillAdamsPhoto_com_group_Get_updates_newsletter_Spry = new Spry.Widget.ValidationCheckbox("Contact_WillAdamsPhoto_com_group_Get_updates_newsletter_Spry",{validateOn:["blur"]});//-->
If you have a WA server validation on your page referring to the checkbox, you will need to remove that too, it would be near the start of the page that look like:
$WAFV_Errors .= WAValidateRQ(((isset($_POST["Contact_WillAdamsPhoto_com_group_Get_updates_newsletter"]))?$_POST["Contact_WillAdamsPhoto_com_group_Get_updates_newsletter"]:"") . "",false,1);
Let me know when the form I sent via your page arrives (if it arrives). I got to the thank you page straight away after removing the above code (using Firebug) and pressing send. At least now the form sends whether the checkbox has been ticked or not.
Neilo,
Thanks for your suggestions, and I appreciate your help in coming up wht fixes on this Form Builder issue.
However I am still wondering WHY I should need to get into the code and deal with this at all. The whole purpose of spending thousands of dollars on all the WebAssist tools I have is so that I DO NOT HAVE TO EDIT CODE. I would think that something so simple as adding a checkbox to a form, unvalidated, should not cause such a problem, or need such an extensive workaround.
Hopefully I will get some help from the WebAssist group on this, and if not I will resort to editing the code using your suggestions.
Thanks again, Neilo, for your time and help! (By the way, I did get the email resonse from your post!)
Cheers Will,
Sorry you had problems with this, - all you needed to do was insert a checkbox in plain old html. (The difficulty was in untangling it from the rest!).
To insert any new form field, put your cursor on the page where you want it, - keeping it out of the way of other code 'entanglements', and have Dreamweaver inset it. So for your checkbox, all that had to go in was:
<label>Join our Mailing List
<input name="checkbox1" type="checkbox" id="checkbox1" value="Yes Please!" />
</label>
I am not keen on CSS Form Builder, I must admit, and wouldn't use it to make forms; (seems like overkill on the grouping and formatting side of things and there can be problems hust getting it to fit), but I use the validations and 'show if' behaviours so am quite happy.
Hope you have a smoother ride from here on.
Thanks again...
So, WebAssist staff...what do you have to contribute???
What you are experiencing in regards to the checkbox has been confirmed and logged as a bug. The current workaround for this is to either use your own checkbox after the fact, or remove the spry validation from the checkbox that is inserted. This is something that we hope to get fixed by the next update.
Thanks for the update, Eric. I will look forward to that fix...I rely on your tools! Hope it is soon.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.