If you're working with D7, you'll want to use #type = text_format (see <a href="http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/7#text_format">http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/7#text_format</a>) and that will give you what you want.<br>
<br>Otherwise, you can use check_markup() or related functions to process the text with the format.<br><br>-Randy<br><br><div class="gmail_quote">On Fri, Nov 18, 2011 at 6:08 PM, Pooya <span dir="ltr"><<a href="mailto:pooya.source@gmail.com">pooya.source@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><div>Anyone know how to use a specific input format for a textarea in form api? There's no property for this option.<br>
</div><div><br></div><div>// This is my form element:</div><div> $form['easyco_custom']['easyco_custom_query'] = array(<br>
'#type' => 'textarea',<br>'#title' => t(My Query'),<br> '#size' => 1000,<br>'#maxlength' => 1000,</div><div>'#prefix' => '', <br> '#suffix' => '', <br>
);</div><div><br></div><div>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)</div><div>
<br></div><div>Thanks in advanced</div><div><br></div><div><br></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Randy Fay<br>Drupal Module and Site Development<br><a href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>+1 970.462.7450<br><br>