RSS

How to add single on/off checkbox with CCK in Drupal

08 Feb

Always I have to spend some extra time while going to add a single on/off checkbox with CCK in Drupal. Each time I think to write a post about it and finally I am going to documented it help others.

This is pretty simple to work with CCK fields in Drupal. But adding on/off checkbox is different from other CCK fields.

  • To add a single on/off checkbox go to Manage Field option for the specific content type
  • Add a new field with single on/off checkbox selection
Add single on/off checkbox

Add single on/off checkbox

  • Into allowed values list we need to add two entry. First one will be ignored and second one will be display into content add/edit page.
Add two values into allowed values field

Add two values into allowed values field

  • Finally checkbox will appear into content add/edit page
Single on/off checkbox

Single on/off checkbox

Advertisements
 
1 Comment

Posted by on February 8, 2012 in Drupal

 

Tags: ,

One response to “How to add single on/off checkbox with CCK in Drupal

  1. tchalvakspam

    August 6, 2013 at 2:27 am

    Turns out it’s important to ensure that the value with the 1 (e.g. 1|Show Title) is at the bottom of the two, the other way doesn’t work out!

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: