[development] nodeapi settings confusion with arrays

Nick Wilson nick at communicontent.com
Sun May 28 12:37:49 UTC 2006

Hi everyone, 

im having a spot of bother working out how to retrieve (or quite
possibly set) an array in the 'settings' part of hook_nodeapi()

--- code ---

    case "settings":
      $form .= form_checkboxes('Paranoia', 'paranoia_settings',
      array(variable_get('paranoia_settings', array('robots'))),
      array('robots' => 'Visible to robots?'));

      return = array('Paranoia' => $form);

--- code ---

It's enirely possible that my problem has more todo with doing the
settings code wrongly, but im i want to do is this:

*   add an extra set of checkboxes (one for now) to set some vars that
    can be retrieved later. 

and the specific problem i'm having is this:

*   i can't seem to use variable_get() to get the value of the varialbe
    i've set to use for the default_value part of form_checkboxes - ie.
    if there is a value set for the array the checkbox should be ticked,
    if not, then not. 

Can someone please help me get back on track?

many thanks..
Nick Wilson

More information about the development mailing list