User login

How to make a simple checkbox in CCK

To make a simple, single checkbox with a CCK field, Agaric thinks the best approach is:

admin/content/type/your_content_type

Add Field

Integer

Give it a label (this is not what will appear next to your checkbox; it is what will be used as a title above it)

Single on/off checkbox

The key is the allowed values list– you need two:

0|Check this box to fill out a profile for another organization you represent.
1|Check this box to fill out a profile for another organization you represent.

There you are!

Agaric uses this with workflow-ng to redirect you to an organization form if the box is checked.

Resolution

Comments

this is great

can you provide some insight now on how to make workflow-ng respond to the CCK integer selection?

nvm, got it:

nvm, got it:

Invoked on event: Content has been created

Conditions: condition Content has type

AND

condition Numeric comparison

using

[node:field_name_of_integer]

is equal to

1

thanks for the great info!

I wish I had found you an hour ago

The CCK on/off checkbox is surprisingly unintuitive. Thank you so much for this simple, yet clarifying post!

Great tip

The two values you have given are brilliant and I am using ints for all my check boxes now.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.