I would like to have the option to move or copy the filter label to input value or placeholder.

(Done like by the project "Compact Forms", but without fancy Javascript.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jennypanighetti’s picture

I would like to see this as well, if it isn't already implemented.

Amir Simantov’s picture

Me too me too!

brtamas’s picture

Here is a kind of solution. It can be used with Placeholder module. (https://www.drupal.org/project/placeholder)

mikeker’s picture

Assigned: Unassigned » mikeker
Status: Active » Needs work

Issue queue cleanup... My apologies for taking so long to address this issue!

@brtamas, thank you for the patch -- especially for including token replacement in the placeholder value! Feel free to mark an issue as "need review" when you attach a patch. It helps separate issues that actually have some progress made from the flood of feature/support requests and bugs without solutions.

I like the idea of adding an option to let site builders specify placeholder text. But I don't like the idea of adding a (soft) dependency on the Placeholder module. It seems that we should be able to do this in the theme layer when rendering the filter using BEF.

(Just realized that would eliminate any filters rendered using the FormAPI instead of BEF's custom theming...)

OK, clearly I need to give this more thought.

mikeker’s picture

Assigned: mikeker » Unassigned
Status: Needs work » Postponed

Postponing until I have time to redo/cleanup the theme layer in BEF.

NWOM’s picture

I have re-rolled and slightly modified the patch to work with the newest dev. This patch is much easier to work with than Compact Forms

NWOM’s picture

Now if only I could get the Placeholders working with the Date Popup widget.

NWOM’s picture

I'm now using Label Trash as an alternative to this patch for those interested.

Edit: Nevermind, it appears certain Exposed Filters don't work with Label Trash, whereas I can add them manually using this patch. So, for the moment, I'll use a combination of both. See: #2710003: Doesn't work with specific Views Exposed Filters

philsward’s picture

Hope to see this included sooner than later. I don't plan to move off Drupal 7 till well after the EoL in late 2021, so this is still a very relevant feature request.

NWOM’s picture

Status: Postponed » Active

#6 still applies cleanly against the newest dev. Setting back to Active, since it was postponed 4 years ago without any update.

NWOM’s picture

Status: Active » Needs review
Neslee Canil Pinto’s picture

Status: Needs review » Closed (won't fix)

Hi, there will be no more future development for 7.x branch. If you see this issue in 8.x, feel free to file an issue. Closing this as Closed(wont fix).

NWOM’s picture

For a D7 fix, I suggest potentially using the Views Advanced Labels module. The only catch is that if you only want the advanced label to be shown as a placeholder, you need to clear the regular label field every time you save/alter the filter.