cformsII Support Forum
Current User: Guest *Frequently Asked Questions*
Search 
Search Forums:


 




Checkbox Field Default

Add a New Topic Reply to Post
Post

Yaakov - Guest

10:58 am - August 13, 2008

  • Your URL: not yet released
  • The browser used: FF3
  • cforms version: 8.6.2
  • Your Wordpress version: 2.6

Currently it is possible to add a Checkbox field to a form. I would like the ability to set the default value of the checkbox (checked or unchecked). The third column in the form setup (which would seem to be the one where you would set default state) is not enabled for checkbox. I would think that either this would be the place to set the default state.


Thanks!

Oliver - Admin

8:59 pm - August 13, 2008

posts 3899

that ought to work already, try the settings in the edit field popup dialog

Yaakov - Guest

8:20 am - August 14, 2008

The edit field popup dialog for the checkbox offers the following options:

  1. Field label left of the checkbox...
  2. ...or define a field label right of the checkbox
  3. Input field title
  4. Custom error message

I don't see anything here relating to default checkbox value (unless there is some other edit field popup that I am not seeing - I clicked on the wrench icon between the Field Name and Type columns)

I also didn't see any mention of setting the default checkbox value in the field help section located at /wp-admin/admin.php?page=cforms/cforms-help.php#check

Oliver - Admin

8:54 pm - August 14, 2008

posts 3899

It seems that you're not using the latest cforms version (like you pointed out above), otherwise you'd see: Set default state

David - Guest

2:12 pm - October 15, 2008

Oliver, Thank you for the good work on cforms.  I, too, want to default a check box to checked.  I have the latest download of cforms.  I click the red tool icon between Field Name and Type to edit.  I see the Set default state you mention and check it.  But my check box is still not checked by default, and I see no other options to change?


David

Oliver - Admin

6:21 pm - October 15, 2008

posts 3899

What cforms version are you using?

Have you saved the settings after leaving the dialog with "OK" (Update Button)?

David - Guest

5:37 am - October 16, 2008

Thanks for the prompt reply.


Version v9.0b


Yes, I did update.  It shows the setting because it added | set:true to the Field name of the check box.  However when I click the edit button it shows Set default state box unchecked.  If I check it again it adds a second | set:true to the Field name.

 The resulting checkbox in my form looks like this:

<input type="checkbox" name="cf_field_2" id="cf_field_2" class="cf-box-a" value=" set:true"/>


but it does not appear checked.


David

Oliver - Admin

7:34 am - October 16, 2008

posts 3899

That looks like an error.  Can you try this simple field/example:

my chk box#|set:true

Also make sure to not reload the page, but to click on a permalink to load it afresh (otherwise your browser thinks it needs to remember the unchecked state of the box)

David - Guest

2:57 pm - October 18, 2008

I had #Please send a full-color brochure| set:true. Changed it to Please send a full-color brochure#|set:true and now the checkbox is checked, with html checked="checked"

Now it works.  Thanks for the quick and precise help!  David

Add a New Topic Reply to Post


Reply to Topic: Checkbox Field Default
PLEASE READ THE FAQs FIRST! THANK YOU.

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 8 + 6        (Required)

Topic Reply:


 
© Simple:Press Forum - Version 3.1.3 (Build 356)