Drupal 7 - Rendering Exposed Form Elements as Icons via Custom Module,
outputting string instead of html
I have a custom module with some simple code:
function theme_extras_form_alter(&$form, &$form_state, $form_id) {
if ($form['#id'] == 'views-exposed-form-city-blog-posts-page') {
$form['field_post_type_tid']['#options']['All'] = t('Refresh');
$form['field_post_type_tid']['#options']['3'] = t('<i
class="icon-twitter"></i>');
}
}
The first replacement works beautifully, but the second renders as plain
text, rather than html. I need to do this for every form element (in fact,
refresh will even be replaced with an icon further down the road). What am
I missing here to properly output the html?
No comments:
Post a Comment