Hi Everybody,
I am a newbie in the drupal module development world. My requirement is that i want to hide all the details like 'Publishing options', 'menusettings', 'authoring information' etc while the user is creating my node type. I have achieved that by creating my own node creation form and using node_save in its submit callback function.
But now the problem is with the node editing form (node/xx/edit). Drupal again defaults to its node creation form when i click the edit button. It displays all the above said information in that. How to tell drupal to display my form in the edit option too?? and how to add a preview option to my form??
Please help me with this.. I searched a lot but was not able to find an answer to this...
Comments
Try this
Hi manujoseph,
read this post: http://drupal.org/node/101092
I think you are looking for a solution like this.
mileZ
Seo Web
Found a non-elegant solution
Hi mileZ,
Thanks for your help.. That post was a very good way of achieving what i wanted.. Thanks a lot for that.. But i found that a lil too complex to implement.. I found another slightly non-elegant way of doing it.. I decided to use hook_form_alter.. I am adding the code below
Any mistakes here or any ways of improving it??
hidden form elements -- not working for me
Hi,
I am using hidden form elements as described above. They are working fine, with one big exception. When I set
the node shows up as "not published", even though the default "published" value is TRUE:
Any ideas what might be wrong?
Thank you.
When you
When you use
$form['options']['#type'] = 'hidden';
you're actually changing the type, which could reset the value. Try:
$form['options']['#access'] = 0;
This should keep the default value
which form you want to hide
which form you want to hide you can use
or you can write your own tpl.
chetan
if access is 0
if access is 0
then it will be loaded from database or not
if yes,
then still a burden for server.
i am wondering why not unset
i also have one question,
if in webapp, i want to delete some elements as early as possible,
how and where should i do
thanks.
https://www.drupal.org/project/image_captcha_indicator
https://www.drupal.org/project/ext_js