I often find myself wanting to have a short string of text be replaced with a large amount of static html code. Unfortunately, the simple search and replace component only has a short text field
In 'flexifilter.components.inc', line 173, I modified the function flexifilter_component_text_simple_replace:
original:
$form['replace'] = array(
'#type' => 'textfield',
'#title' => t('Replacement text'),
'#default_value' => isset($settings['replace']) ? $settings['replace'] : '',
'#required' => FALSE,
);
Replacement:
$form['replace'] = array(
'#type' => 'textarea',
'#title' => t('Replacement text'),
'#default_value' => isset($settings['replace']) ? $settings['replace'] : '',
'#required' => FALSE,
);
This just changes the textfield to a textarea, thereby allowing longer replacements.
Might be worth incorporating this change in the next version of Flexifilter-- a textarea can always hold a shorter section, but a textfield can't easily hold a larger.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | flexifilter-399486.patch | 800 bytes | kenorb |
Comments
Comment #1
kay_v commented+1
Comment #2
sapark commented+1
Comment #3
kenorb commentedPatched attached.
Comment #4
kenorb commentedComment #5
kenorb commentedDrupal 6 is no longer officially supported. If you think this issue is still relevant for 8.x, feel free to re-open.