Hello everyone!

I am creating a module for Drupal 6. I am using hook_schema, hook_install and hook_uninstall as per Drupal 6 API. In this module, I am defining a new type of content (using hook_node_info). The thing is that it has two fields, "name" and "surname" and, while "surname" is working fine when inserting new nodes, "name" is not. It takes the username in the account (e.g. admin) instead of the value I am writing in the form (as defined in hook_form).

I am about to change them to "first_name" and "last_name", but I'd like to know why it's taking "admin" from my $node->name attribute and whether there is any way I can prevent that from happening.

Thanks.

Comments

jsabater’s picture

Any ideas?

In the end it switched to first_name and last_name, but I'd like to know the reason.