Here's what I'm looking for: CCK form fields (and/or fieldgroups) which generate automatically given some conditions.

For example, I create a new node, and am presented with a form field for each user in the database with a particular role.

So, let's say I have 15 users in my drupal site, the content type then presents me with 15 input text fields -- one associated with each user.

Is this something I can do within CCK?

Comments

nevets’s picture

You could do something like that for checkboxes/radioes/select using CCK but I do not think you can do that for text fields. That sounds more like a custom field type.

zwhalen’s picture

Hmm, that might actually work, at least as a way into the problem.

If not, how would you recommend creating a custom field type. That is, would I have to build my own module, or is there someway to build my own form within an existing module?

zwhalen’s picture

Oh, OK. I see now on the form for creating a CCK field, you can enter PHP code to generate an array of values. That may be enough of a hook to get me what I need.