Before I start i'll confess that i'm a drupal noob..I'm implementing a requirement in drupal 6.22 with drupal's Domain Access module ( http://drupal.org/project/domain ) which unfortunately has less documentation for a person of my level.

My requirement is such that the people who typically create/add content (page/story) do not need to see the fieldset of domain module with the Domain Access Options, and the created node by default should be sent to all affiliates and published to all the Sites in affiliates list.

I felt that rather than covering up the fieldset in a theme based manner which wasn't much preferrable i felt it needed to be a form alter kind of approach.

Initially planned to use hook_nodeapi to set the $form['domain']['#access'] = FALSE, but realised that it actually does the following as per Drupal's Forms API

"the element is not rendered and the user submitted value is not taken into consideration."

Since I require the values to be set in an invisible manner that wouldn't help. I wish to learn the following

  1. Is my approach of using hook_nodeapi the right way, else any other like hook_form_alter or hook_form_FORM_ID_alter a better suited one or am i totally on the wrong track.
  2. How does one set multiple checkboxes as checked in 'checkboxes' type in drupal forms. Couldn't find examples suited to my level of IQ (:D)
  3. If I manage to accomplish my current requirement is there a possibility where I could set some params such that only specific affiliated sites are set for a node based on the user's access and my business logic.

Any help or suggestions on this specific issue are most welcome.

Thanks and Cheers!!

1 Answer 1


I found my solution: I set the respective values in the node save events, which didn't require to use the interface provided by Drupal. I didn't have concerns on the form and its settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.