D7: Why can't I move a field into a fieldset in a Drupal form - fails to pick up current value

I have a node form in Drupal 7, in order to simplify it for the user I want to break it up into sections using the vertical tabs feature.

Using hook_form_FORMID_alter() I can move the fields without difficulty. When the node is saved, it writes the values correctly, and they appear in the node view.

But when I re-edit the node any value for a moved field is not set so I effectively lose the data. I've tried various options including changing the array_parents value in $form_state['fields'][$field][$langcode].

Any ideas?

Set content type in hook_block_info for D7

How do you set the content type for a block using hook_block_info() in a module?
As far as I can tell it's only possible through the blocks UI in the configure block page.

Remove a Content type

Hi !

I made a new content type and a views page for it, then I found that I wanted to delete it.

I deleted the content first , then the views and last the content type.

In effect its all gone like I wanted , but when I press add new content I still find that content type on the list
(If I click on it nothing happens as espected since its deleted..)

How do I get rid of that delteted content type from the "add new content" list ?

Any help appretiated !
Tor

Relative links

Hi,

Currently I'm building a drupal site in a sub-directory of a site. When I finish I'm moving it over to the root. When I'm making a link is there a way to setup a relative link that will work both before and after the move. Right now if I do:

./drupal/page

it works, but I'll have to go back and change all of these when I transfer and

./page

will work when I'm done but will be quite unusable right now. Is there a way I can just simply write these links to the drupal root instead of the site root?

How to list nodes refering to the node?

Ok, I have two types of nodes: projects and publications. On publication one can select a project which this publication references (CCK field).

And I haven't figured out how to list referencing publications on the project page? There is reverse reference module, but it's only for D6 and I am now building with D7.... Can this be achieved with views?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x