[development] Module Idea for Feedback: Select Option Values

Shai Gluskin shai at content2zero.com
Thu Jan 28 13:04:04 UTC 2010

Development Peeps,

I'm thinking of a module called: Select Option Values

It would pull out part of CCK's text.module functionality
from admin/content/node-type/<type machine name>/fields/field_<field name>
and put it on its own admin page with it's own permission. The problem with
the location of the setting, as it is now, is that you have to have
"administer content-type" permissions in order to get there and that is
something rarely given to a client, at least in my experience.

But the allowed values maintenance for a select list is something I
*want*to give over to client content-editors/admins.

My current workaround is that I designate the body field of a particular
unpublished node for that purpose and provide a link to it in a the custom
admin area I typically build for site editors.

I put the following code in the "Advanced usage only: PHP code that returns
a keyed array of allowed values.":

$node = node_load(17); // Replace "17" with node id of node containing
$body = strip_tags(str_replace("\r\n","~",trim($node->body)));
$arr = explode("~",$body);
return drupal_map_assoc($arr);

That work-around is okay, but it does feel like a work-around better solved
by a module.

Does this exist and I didn't find it? Is it needed in your estimation?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100128/8a17c192/attachment.html 

More information about the development mailing list