hi.i want customize the vertical tab of create new quiz.
I want remove availability option tab and I do not access to this in structure-->content type--->lesson
please guide me.
James Aparicio
Fri, 05/20/2016 - 17:38
Hi mahnaz
Hi mahnaz
You should be able to do it with the hook hook_form_FORM_ID_alter.
BTW, i have deleted the other 2 similar (duplicated) threads created by you. Please avoid creating duplicated threads, we respond in the forum as fast as we can, no point in creating several posts. It only delays the forum support.
Best regards
mahnaz
Fri, 05/20/2016 - 19:31
how use hook_form_BASE_FORM_ID_alter?
thanks.but I don't know use this function.
How should I use this function to disable this tab?
(I mean, what code to write on this subject?)
Thank you in advance for your help.
Once you have this, use the hook hook_form_FORM_ID_alter() and find, in the $form variable, the part corresponding to the fields that you want to remove. Then you just have to change their #access parameter to false and the field will disappear. Do not forget to fulsh the cache when you add a hook.
If you don't know how Drupal's development works, you can really easily find some tutorials with Google. Finaly, we can do some developments for you if you want. For this, you can find more information here: https://www.opigno.org/en/professional-services/custom-development.
Hi mahnaz
Hi mahnaz
You should be able to do it with the hook hook_form_FORM_ID_alter.
https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_form_FORM_ID_alter/7.x
Best regards
BTW, i have deleted the other
BTW, i have deleted the other 2 similar (duplicated) threads created by you. Please avoid creating duplicated threads, we respond in the forum as fast as we can, no point in creating several posts. It only delays the forum support.
Best regards
how use hook_form_BASE_FORM_ID_alter?
In reply to BTW, i have deleted the other by James Aparicio
ok sorry
Hi manhnaz,
Hi manhnaz,
You can use the hook hook_form_alter() in order to find you form ID (https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_form_alter/7.x).
Once you have this, use the hook hook_form_FORM_ID_alter() and find, in the $form variable, the part corresponding to the fields that you want to remove. Then you just have to change their #access parameter to false and the field will disappear. Do not forget to fulsh the cache when you add a hook.
If you don't know how Drupal's development works, you can really easily find some tutorials with Google. Finaly, we can do some developments for you if you want. For this, you can find more information here: https://www.opigno.org/en/professional-services/custom-development.
Greetings,
Allan