Drupal Questions & Answers

Ask and answer Drupal related questions! No question too simple or complex!
adrianmak's picture
Asked by on Fri 24th Apr 2009
How to set the publish option default value in node edit form

I’m theming a node edit form to not show some irrelevant form data on the node edit form.
One of the form element I want to hide is the publish option
I unset like this

GOOD, this element is not shown but….all submitted node will be “not published” status
Then I put a line of code
$form['options']['status']['#value'] = 1;
to set the default value to “published” before unset it.

But the same problem. Anything wrong I did ?

Commenting on this Drupal Question is closed.