Hi,

I have followed all the steps of http://dialogmix.com/drupal-webform-checkboxes-radio-buttons. Using this I got the checkbox but I want it as an enabled by default. Can anyone help me out of this?

Thanks in advance.

Comments

bskibinski’s picture

It's strange that i didn't find an older thread where somebody answered this question.

But i have the same problem. when you make radio buttons or checkboxes, there is a field "default value" but this doesn't do anything, tried the name of the option i wanted checked by default, a number, a key, but nothing works.

you would expect this would be a handy feature in webforms... or maybe i'm missing something.

(the only way i can do it now, is by turning the checkboxes into a listbox, and then when you fill something in the "default value" field (anything, doesn't matter what you fill in) AND make it mandatory, it wil select the first item from your options by default... but this isn't alway's the prettiest solution.)

Thanks all!

untrammelled’s picture

This works for me:

Click on the "Webform" tab. Create or edit a "select" field.

In "Options" set a key-value pair, eg:
sign_up|Sign up

In "Default value" enter the key:
sign_up

Tick the "multiple" box to enable a checkbox.

Check by clicking on the "View" tab. You should see a tick in the box (by default) followed by the text "Sign up".

Hope that helps,
Chris.

akshita’s picture

Please look into my issue : http://drupal.org/node/1785028

thanks