Skip to content

Instantly share code, notes, and snippets.

@vkareh
Created Jun 25, 2012
Embed
What would you like to do?
Forcing an input format on a textfield
$form['my_text_field'] = array(
'#type' => 'text_format',
'#base_type' => 'textfield',
'#title' => t('My Text'),
'#default_value' => '',
'#format' => 'filtered_html',
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment