/ Published in: PHP
Only tested for Text and Number field types.
Expand |
Embed | Plain Text
function get_cck_text_field_allowed_values($field_name) { $result = db_query("SELECT * FROM {node_field} WHERE field_name = '%s'", $field_name); if($row = db_fetch_array($result)){ if($field['allowed_values']){ if ($field['allowed_values_php']) { $allowed_values = $result; } } if (!$allowed_values) { foreach ($list as $opt) { // Sanitize the user input with a permissive filter. $opt = content_filter_xss($opt); } } return $allowed_values; } } return NULL; }
Comments
Subscribe to comments
You need to login to post a comment.

The table is now contentnodefield Besides that, it works good, thanks. SY