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.
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@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Michel Morelli Sent: Wednesday, February 03, 2010 7:33 AM To: support@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.
Metzler, David ha scritto:
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.
Hi, I have tried :
$form['field_statename_value']['#autocomplete_path'] = 'ostoni/pastai/views/regione'; $form['field_county_value']['#autocomplete_path'] = 'ostoni/pastai/views/provincia'; $form['field_countryname_value']['#autocomplete_path'] = 'ostoni/pastai/views/countryName';
But the result is the same. I can not see the circle of autocomplete.
Tnx however.
Michel Morelli ha scritto:
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.
One more info: this form is a view exposed form .
M.
SOLVED.
Tnx to all.
M.