[development] Hide input forrmats

Frando frando at xcite-online.de
Sun May 7 01:38:02 UTC 2006

michel ziobudda morelli schrieb:
> Hi all. Is there a method to disable the choice about input formats in a
> node ?
> I have my node type (zbnews), my module (zbnews.module) and a new input
> formats for it (zbnews-inputformat). Now In the "add" form I want to
> disable the choice of input formats or display only "zbnews-inputformat"
> input format.
> Is this possible ?
> Tnx.
Natively you can configure input formats only globally (for all modules)
and/or by role, not by module.

What you could do is to create a new module, and manipulate the "create
content" form of that content type via hook_form_alter().
See http://api.drupal.org/api/HEAD/function/hook_form_alter for details.

To get the relevant information (formid, form structure etc) just
print_r $form and $formid.


More information about the development mailing list