It would be nice to have placeholders in the text fields for those who use them in other Forms.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MarioBrus’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev
rszrama’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

I don't know what you mean.

danharper’s picture

I think he means like the following modules support.

http://drupal.org/project/field_placeholder
https://drupal.org/project/elements

Cheers Dan

bgilhome’s picture

FileSize
507 bytes

Here's a patch that adds support for Placeholder/Elements module. You could also hide the title via '#title_display' =>'invisible' if desired.

djschoone’s picture

If you are using field_placeholder.module the code would be

    if(module_exists('field_placeholder')){
      $child['#attributes']['placeholder'] = $child['#title'];
    }
bojanz’s picture

Title: Placeholder in text fields » Add integration for the Placeholder/Elements modules
Status: Postponed (maintainer needs more info) » Active
jmary’s picture

Removed some warning due to non-existence of #title key, and added support to mark the placeholder as mandatory so that the label can be set at display:none

kenorb’s picture

Status: Active » Needs review
SocialNicheGuru’s picture

could support be added for field_placeholder also?

ShaneOnABike’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm this worked great for me.

ShaneOnABike’s picture

Is it possible to push this into the latest dev