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.

CommentFileSizeAuthor
#3 flexifilter-399486.patch800 byteskenorb

Comments

kay_v’s picture

+1

sapark’s picture

+1

kenorb’s picture

StatusFileSize
new800 bytes

Patched attached.

kenorb’s picture

Version: 6.x-1.1-rc2 » 6.x-1.2
kenorb’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Drupal 6 is no longer officially supported. If you think this issue is still relevant for 8.x, feel free to re-open.