I would like to put the form field inserted by privacy node field right at the bottom of the custom node type fields created using cck.
Right now it is in the middle of the other form fields and not in the place I would like. I tried to change the value of the weight of the form field as in the following code. But does not bring any change in the position of the form field with respect to other fields.
$form['account']['privacy'] = array (
'#type' => 'select',
'#title' => $title,
'#options' => $options,
'#default_value' => $current_level,
'#weight' => 10 //tried not moving even large number is tried not working
);
Comments
Comment #1
ben_scott commentedHi wisdom -
The reason this isn't working is you need to change the weight of $form['account'], not $form['account']['privacy'], to get the field to move.
If you use:
$form['account']['#weight'] = -10;It should do what you're after.
Cheers, b3n
Comment #2
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
Marat commentedThis code works with me, I simply add
$form['account']['#weight'] = -10;and specify the weight I want.Thanks b2n
Comment #4
najibx commentedDoes this module make the whole node 'private'. Or if i added a CCK field, can I set certain field to be public or private?
If not, can anyone direct me to a solution.
TQ
Comment #5
wisdom commentedThis node makes the whole node private. Go to downloads->modules and then cck and check if there is one available which allows you to define access privileges per field. My instinct tells me I have read one but never used that.
Comment #6
najibx commenteddear wisdom, idea taken.
http://drupal.org/project/cck_field_perms