Problem/Motivation

User name filter description("Enter a comma separated list of user names.") is always render even when filter exposed and user have provided specific description.

Proposed resolution

Make description behave same way as other filters do: visible on filter configuration form, replaced by user provided description on exposed filter form.

Remaining tasks

  1. Review patch
  2. Commit

User interface changes

No more hard-coded "Enter a comma separated list of user names." help text on user name exposed filter.

API changes

None.

Original description

Hi,

I have an exposed filter in my view for the user name and I would like to to remove the descriptive text beneath this form element

EG the User name form element, then directly below this you would find .... 'Enter a comma separated list of user names.'

This is the text i wish to remove, but for the life of me I cant find where?

Thanks for your advice

Cheers

Luke

Comments

fadgadget’s picture

hi i was wondering how to do this too. anyone?

thanks

jvandyk’s picture

A quick and dirty way to do it is to define that specific string to be empty in your settings.php. Doing this will make you feel unclean, though.

/**
 * String overrides:
 *
 * To override specific strings on your site with or without enabling locale
 * module, add an entry to this list. This functionality allows you to change
 * a small number of your site's default English language interface strings.
 *
 * Remove the leading hash signs to enable.
 */
# $conf['locale_custom_strings_en'][''] = array(
#   'forum'      => 'Discussion board',
#   '@count min' => '@count minutes',
# );
$conf['locale_custom_strings_en'][''] = array(
  'Enter a comma separated list of user names.' => '',
);

The correct way to do this is to implement hook_form_views_exposed_form_alter() or at the theme level with a preprocess function or a custom tpl.php. By all means do not do it the way I show above. You don't want things like this living in your settings.php.

suresh7787’s picture

y dont u try to use css to hide that text?. Select that div and use css properties hide it like display:none.

suresh7787’s picture

Issue summary: View changes

Updated the descriptive text

rosk0’s picture

Title: remove text 'Enter a comma separated list of user names.' from exposed username form element » Improve user name filter behavior
Version: 6.x-3.0-rc3 » 7.x-3.x-dev
Component: Miscellaneous » exposed filters
Category: Support request » Bug report
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.27 KB

Updating title, description, version and providing patch for review.

rosk0’s picture

StatusFileSize
new1.27 KB

Same patch for test bots.

chris matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 2 year old patch in #5 to views_handler_filter_user_name.inc does not apply to the latest views 7.x-3.x-dev and if still relevant needs to be rerolled.

Checking patch modules/user/views_handler_filter_user_name.inc...
Hunk #1 succeeded at 40 (offset 8 lines).
error: while searching for:
    if (!empty($form_state['exposed']) && !isset($form_state['input'][$this->options['expose']['identifier']])) {
      $form_state['input'][$this->options['expose']['identifier']] = $default_value;
    }
  }

  function value_validate($form, &$form_state) {

error: patch failed: modules/user/views_handler_filter_user_name.inc:40
error: modules/user/views_handler_filter_user_name.inc: patch does not apply
andrew answer’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new1.07 KB

Patch rerolled.