Is it possible to set a default so that a predetermined block will appear on all nodes with that field, or must the block be set only on a per node basis at creation?

Comments

danielb’s picture

Yes, just edit the field settings, there is a 'default value' fieldset there. You can't really do it the first time you configure the field, but if you re-edit it, you can.

highvoltage’s picture

Ok, thank you. ^_^

I'll have great use for this module then.

danielb’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

dellis’s picture

Status: Closed (fixed) » Active

I had a follow-up question for this issue...

using the drag-drop list widget, I would like to set multiple defaults using php (since the default "default widget" is a drop-down--not allowing multiples). following the help on the field, I tried:

return array(
 0 => array('bid' => 5),
 1 => array('bid' => 7)
);

But, while there does appear to be an additional select widget (3 instead of the usual 2), it still lists all of the blockreferences as <none>. Any ideas?

Thanks. -derrick.

danielb’s picture

I would just make a module and use hook_form_FORM-ID_alter to set the defaults when the node edit/add page is loaded.

danielb’s picture

as far as I can tell you've done the right thing with your code, as long as 5 and 7 are the correct values

danielb’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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