By rad_one on
Hello all,
I am trying to develop a custom module. It is working fine but...
I want to add a text_format field in block configuration form:
$form['partners_text'] = array(
'#type' => 'text_format',
'#title' => t('Partners text'),
'#default_value' => $config['partners_text'],
'#format' => NULL,
'#description' => t('Text to put in partners tab.'),
'#required' => TRUE,There is no validation (yet) of the form fields.
This is my template snippet for this block:
{#
/**
* @file
* Theme for Partners Feed block.
*
* Available variables:
* - text:
* - more_link:
* - more_text:
*
* @ingroup themeable
*/
#}
<div class="container-fluid">
<div class="row">
<div class="col-md12">{{ text|raw }}</div>
</div>
<div class="row">
<div class="tab-footer"><span><a target="_blank" href="{{ more_link }}" class="more-link">{{ more_text }}</a></span></div>
</div>
</div>
The variable text is not rendered and
is empty.
I also tried without |raw, unsuccessfully.
What did I miss ?
I use core CKEditor and a basic html format. Filters enabled are:
- Limit allowed HTML tags and correct faulty HTML
- Align images
- Caption images
- Restrict images to this site
- Track images uploaded via a Text Editor
Thanks,