[development] Using specific input format for textarea
Randy Fay
randy at randyfay.com
Sat Nov 19 02:54:35 UTC 2011
If you're working with D7, you'll want to use #type = text_format (see
http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/7#text_format)
and that will give you what you want.
Otherwise, you can use check_markup() or related functions to process the
text with the format.
-Randy
On Fri, Nov 18, 2011 at 6:08 PM, Pooya <pooya.source at gmail.com> wrote:
> Anyone know how to use a specific input format for a textarea in form api?
> There's no property for this option.
>
> // This is my form element:
> $form['easyco_custom']['easyco_custom_query'] = array(
> '#type' => 'textarea',
> '#title' => t(My Query'),
> '#size' => 1000,
> '#maxlength' => 1000,
> '#prefix' => '',
> '#suffix' => '',
> );
>
> I've created a new input_format using admin/settings/filters and I need to
> use it here. It's a SQL syntax highlighter(it's not about executing this
> sql, so no injection)
>
> Thanks in advanced
>
>
>
--
Randy Fay
Drupal Module and Site Development
randy at randyfay.com
+1 970.462.7450
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20111118/edcd2f04/attachment.html
More information about the development
mailing list