Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Allow people to use the HTML5 placeholder attribute instead of label if they so desire.
Comments
Comment #2
mchampsee CreditAttribution: mchampsee at Champsee Solutions, LLC commentedComment #3
mchampsee CreditAttribution: mchampsee at Champsee Solutions, LLC commentedComment #4
Perignon CreditAttribution: Perignon commentedFunctionally, this patch works but needs a little cleanup. Three instances of white spaces in the patch.
I'll be glad to clean them up if you want me to.
Comment #5
Perignon CreditAttribution: Perignon commentedWhite space added here.
Comment #6
Perignon CreditAttribution: Perignon commentedDreditor isn't pasting in all the code I commented on correctly. Deleting.
Comment #7
ShaneOnABike CreditAttribution: ShaneOnABike commentedI can confirm that this patch works magically on the latest dev build THANK YOU!
Comment #8
Perignon CreditAttribution: Perignon commentedYes patch works, just needs cleaned up.
Comment #9
Perignon CreditAttribution: Perignon commentedThis is a cleaned up patch removing the whitespaces. Corrected the PHPDoc parameters and fixed a code style issue with using
else if
Comment #10
Perignon CreditAttribution: Perignon commentedCrap. Missed a few carriage returns. Fixed in this patch.
Comment #11
mchampsee CreditAttribution: mchampsee at Champsee Solutions, LLC commentedFixed two issues that I found:
1)If you upgrade on an existing site with existing signup forms, PHP will throw a warning that it can't find the placeholder variable
2)Changed so that placeholder will not be applied to radio and dropdown fields
Comment #12
mchampsee CreditAttribution: mchampsee at Champsee Solutions, LLC commentedComment #13
mchampsee CreditAttribution: mchampsee at Champsee Solutions, LLC commentedComment #14
Perignon CreditAttribution: Perignon commentedThe latest patch will not apply as it is created against a tagged release of 7.x-4.4. Please re-roll patch against the development branch 7.x-4.x.
Comment #15
mchampsee CreditAttribution: mchampsee at Champsee Solutions, LLC commentedoops.
Comment #16
mchampsee CreditAttribution: mchampsee at Champsee Solutions, LLC commentedComment #17
Perignon CreditAttribution: Perignon commentedCrap. Dev changed again.
Comment #18
mchampsee CreditAttribution: mchampsee at Champsee Solutions, LLC commentedRe-rolled against latest dev release
Comment #19
idebr CreditAttribution: idebr commentedInstead of removing the #title property, why not apply '#title_display' => 'invisible'? This leaves the renderable array intact for other modules, and provides accessibility benefits as well, see https://api.drupal.org/api/drupal/developer%21topics%21forms_api_referen...
Comment #20
Perignon CreditAttribution: Perignon commentedAnd I also cannot apply this patch with a fresh pull from D.O
Comment #21
Perignon CreditAttribution: Perignon commentedSo I found why it will not apply. It is this piece of code
Comment #22
Perignon CreditAttribution: Perignon commentedI yanked out the part that isn't working. It was just an array formating to multi-line
Comment #23
Perignon CreditAttribution: Perignon commentedI can only think of the Title (label) being retained for legacy purposes. I say it would be a toss up to make them hidden or just delete them as he has done.
Comment #24
mchampsee CreditAttribution: mchampsee at Champsee Solutions, LLC commentedFor what it's worth, I reached out to a blind colleague who had said that he could "see" the fields using this module.
Comment #25
helmo CreditAttribution: helmo at Initfour websolutions commentedHere's a re-roll.... it broke because of the included code style changes.
I've split it in two patch files.
The effect is OK
Comment #26
koppie CreditAttribution: koppie at Exygy for Cohere commented+1 for RTBC. Can we get this in the dev branch???
Comment #27
Greg BoggsYou'll need to apply the patch for the moment. But, we'll update this issue as soon as the code is committed.
Comment #30
ruscoe CreditAttribution: ruscoe at ThinkShout for Mailchimp commentedWorks great, thank you. Committed to the dev branch.