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

ben_scott’s picture

Status: Active » Fixed

Hi 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

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Marat’s picture

This code works with me, I simply add $form['account']['#weight'] = -10; and specify the weight I want.

Thanks b2n

najibx’s picture

Does 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

wisdom’s picture

This 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.

najibx’s picture