I am trying to use Automatic Nodetitles with the CCK Field Perms module, but can't quite get it to work? What I am trying to do is set the node title from a CCK field that is only editable by certain roles. The problem is that CCK Field Perms unsets the form field, essentially making the field value no longer available to auto nodetitle? I tried using both $form_values and tokens to derive the title, but both seem to need the form value. My PHP skills aren't high, but here is the PHP code I was trying to use:
<?php
$token = '[field_client_group_id-raw]';
global $form_values;
if ($form_values[field_client_group_id][0]['value']) {
if ($form_values[field_client_group_id][0]['value'] == '') {
return '00000';
}
else {
return $form_values[field_client_group_id][0]['value'];
}
}
else {
return $token;
}
?>
Comments
Comment #1
mshaver commentedI realize I was referring to the wrong module. It is actually workflow fields that is hiding fields in a workflow, causing auto nodetitle to not work with a hidden field. I opened a request in that module to see if simply disabling the field for non-permissioned users would be a better alternative.
Comment #2
fagothat's probably a problem with the token integration that doesn't work with this module.
Comment #3
gaurav.kapoor commented