[support] Form alter works only for Administrator

Metzler, David metzlerd at evergreen.edu
Wed Feb 3 15:51:11 UTC 2010


Is it possible that the menu paths are not accessible for the
non-admins.  It seems suspect that 'admin/pastai/views/regione'   would
be in the admin path if you wanted all users to be able to use it.  I'd
check the security for those menu items.  

-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Michel Morelli
Sent: Wednesday, February 03, 2010 7:33 AM
To: support at drupal.org
Subject: [support] Form alter works only for Administrator

Hi all. I have this code in my hook_form_alter:

 if ($form_id == 'XYZ')
  {
    $form['field_statename_value']['#autocomplete_path'] =
'admin/pastai/views/regione';
    $form['field_county_value']['#autocomplete_path'] =
'admin/pastai/views/provincia';
    $form['field_countryname_value']['#autocomplete_path'] =
'admin/pastai/views/countryName';
  }


This code works but only for Administrator. When I use a normal user I
can not see the ajax's circle in those fields.

In my hook_form_alter there is not check for user or roles or
permission.

Tnx.

M.

-- 
Michel 'ZioBudda' Morelli                       michel at ziobuddalabs.net
Sviluppo applicazioni CMS DRUPAL e web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 --  Fax: +39-0291390660

http://www.ziobudda.net                         ICQ: 58351764  
http://www.ziobuddalabs.it                      Skype: zio_budda
http://www.ziodrupal.net       			MSN:
michel at ziobuddalabs.it                   
						JABBER:
michel at ziobuddalabs.it

--
[ Drupal support list | http://lists.drupal.org/ ]


More information about the support mailing list