close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Checkbox Initial Value

Thread began 10/05/2009 10:26 am by chi300633 | Last modified 10/14/2009 9:18 pm by paputxi | 2422 views | 4 replies |

chi300633

Checkbox Initial Value

The checkboxes I've created in Form Builder are checked by defualt and I'd like them to not be checked. I cannot find anywhere to choose that. Oddly, even though they are showing that they are checked, they apparently are not. For example, if you choose something like "Same as Billing Address", the Mailing address form boxes are not automatically filled unless you uncheck and recheck the "Same As..." checkbox.

This is confusing to my customers.

What is the way to control the behavior of the check box display?

Thanks,

Sign in to reply to this post

Jimmy Wu

The checkboxes are defaulted to be checked. If you want to remove this, look at the checkbox field code after applying the form to the page. Find the code that looks like this:
{echo "checked=\"checked\"";}

Remove that code, since it adds the code that specifies the checkbox is checked.

The reason the Same as Billing Address does not copy the information over is that the script to copy the billing information to the shipping information runs when the checkbox is checked, so if it is defaulted as checked, the information never gets copied over. the checkbox is meant to be checked only after the billing information is all filled out correctly.

Sign in to reply to this post

paputxi

Jimmy,

I have the same problem with wanting a checkbox to be unchecked. I had created a checkbox using FB and left the Validation option unchecked since I didn't want that feature. So, I followed your advice to manually remove {echo "checked=\"checked\"";} associated with my checkbox; so, that worked.

But even after doing that, there must be some validation artifact there (even though I didn't select any Validation when I created the checkbox) that is requiring that the field to be checked. If I don't check the checkbox, I see a very narrow red box where an error message would probably be. It only goes away and allows the Submit button to work after checking the checkbox, i.e., I can't Submit the form if the checkbox is unchecked.

I created a simple checkbox that can be seen at test5.php so that you can see what I am talking about.

Any advice on how I can manually correct this problem? Thanks in advance.

Sign in to reply to this post

Jimmy Wu

This looks like it is caused by the client side validation. If you go to the page and click on the SPRY checkbox element and then in the properties inspector, change from Required (single) to Enforce Range (multiple), the for should submit even if the checkbox is not checked.

Note: In the code, you will notice that changing from Required to Enforce Range will modify a line of code similar to this one:
var fieldset_group_field_Spry = new Spry.Widget.ValidationCheckbox("fieldset_group_field_Spry", {validateOn:["blur"]});

To look like this:
var fieldset_group_field_Spry = new Spry.Widget.ValidationCheckbox("fieldset_group_field_Spry", {validateOn:["blur"], isRequired:false});

Sign in to reply to this post

paputxi

Thanks, Jimmy. Deleting the "echo" code and changing that one SPRY checkbox property to "Enforce Range" resolved my problem. Thanks again.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...