Set default input filter for particular form item

lsiden's picture

I thought there was a way to configure particular form items (usually textareas) to use a particular input filter by default that may be different than the global default set in /admin/settings/filters. Does anyone remember that or am I imagining things in my coding delirium?

Comments

Answered my own question

lsiden's picture

The way that worked for me is to use hook_form_alter(). The format option will be in $form[$field_name]['format'].

If it's a hand-crafted form,

vkareh's picture

If it's a hand-crafted form, you don't need a hook_form_alter, since you can just set the format flag manually. For CCK fields, you can allow input filter by selecting Filtered text (user selects input format) under Text processing.

Now, if you need to force an input that's different from the default, you're looking at the Better Formats module.

Jackson, Michigan

Group organizers

Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week