2

I am creating a form using the Drupal 6 Form API and I have a set of checkboxes. One of the options is "Other."

Is there a way to have one of these options be a fillable field? How would I define that in the options array.

Thinking something like:

[] Option A
[] Option B
[] Other ___________

Any ideas?

2 Answers 2

3

The easiest way is to add the Select or Other module.

It lets you define these using the Form API, CCK, Webform and some others.

2
  • Great suggestion, but I'd rather not add another module dependency to our site. Any other known work arounds?
    – oranges13
    Aug 15, 2011 at 17:36
  • 1
    There's no way to "embed" a select box into a checkbox array. I wrestled with this awhile back and the closest I could come up with was to add a new select box element, and just float it with CSS to make it appear inline. In the end I went with the select or other module though. Aug 15, 2011 at 18:11
0

There is a neat CCK field here: CCK Select Other

I just installed it and it seems to be working fine, but don`t take my word for it as I see it is still dev. version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.