This module allows users to enable automatic placeholders to textfields, textareas, select lists, and email fields within a webform created by the Webform module.
The placeholders provided by Webform Hints use the component's title and are applied on a per-webform basis. When the HTML5 placeholder attribute isn't available, this module grants optional legacy browser support using a jQuery Plugin fallback. Label elements are then hidden via .element-invisible to keep them available to screen readers. Required indications are also present and configurable.
Usage
After creating your webform, visit the Webform Hints administration panel to enable the Webform Hints functionality on the nodes of your choosing.
- Drupal 7: admin/config/content/webform-hints
- Drupal 6: admin/settings/webform-hints
Sandbox Project Page
https://drupal.org/sandbox/chrisfree/1128558
Git Repository
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/chrisfree/1128558.git webform_hints
Ventral.org Review
http://ventral.org/pareview/httpgitdrupalorgsandboxchrisfree1128558git
Simplytest.me
http://simplytest.me/project/1128558
Reviews
- https://drupal.org/node/2014453#comment-7525217
- https://drupal.org/node/2017329#comment-7553649
- https://drupal.org/node/2013591#comment-7553781
Comments
Comment #1
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
medienverbinder commentedHi!
Manual review:
- Install a fresh drupal 7.22
- Move the module package "webform_hints" to folder to sites/all/modules
(Suggestion: For the overview, I would put all the js files in a separate js directory)
- Move the module package "webform" to folder to sites/all/modules
- Enable webform (no problems found)
- Enable webform_hints (no problems found)
Suggestion: You can specify the path to the configuration already in the webform_hints.info file.
(https://drupal.org/node/542202)
(add "configure = admin/config/content/webform-hints" to webform_hints.info)
- Visit webform_hints configuration (no problems found)
- Save configuration (no problems found)
- Added Test Webfom Content (no problems found)
- Visit webform_hints configuration and apply webform_hints effect to Test Webform (no problems found)
- Edit Test Webform Content => got already shown filled text boxes
- The pre-filled text are also stored and displayed in submissions
Question;: If I set the fields to "Mandatory" the pre-filled text (placeholder) is not accepted if I want to save the form. If the function as intended?
Best regards.
Comment #3
chrisfree commentedThanks for the review medienverbinder!
I've updated the module with the following:
As for your question regarding whether the form should allow submissions on fields where the value matches the placeholder, I believe this is the intended behavior. This module, however is not altering any validation rules.
Thanks,
Chris
Comment #4
jamiehollernChris,
I've had a look and I have the following points to make:
I didn't come across any other issues though and this module is a great idea that fills an obvious gap in the Webform module's functionality. Great job.
Comment #5
chrisfree commentedThanks for the review jamiehollern, very much appreciated.
After much research, testing, hair-pulling, etc., I ended up replacing the jQuery fallback plugin to another, found here: https://github.com/palmerj3/jQuery-Plugin---Form-Field-Default-Value
This plugin is using the MIT Sofware License, which is GPL compatible, see here: http://en.wikipedia.org/wiki/MIT_License
Coincidentally, this plugin also addresses a minor issue with older IE versions not clearing default/placeholder values on form submissions, so this ends up being a better solution on both fronts.
Regarding your suggestion on module categorization, I agree that this is probably a judgement call as it could fit in either category. I think most users would expect to find the module listed with Webform and other Webform modules, so I changed it: http://drupalcode.org/sandbox/chrisfree/1128558.git/commitdiff/32cb1423f... -- good call there.
Regarding customizing placeholder values, I think this would be a pretty great feature in the future. And coincidentally, this new plugin might actually be better suited to the task (depending on implementation). I'd prefer to get this module moved to official project status before adding that feature in, if possible. :-)
Additionally, I fixed a few issues that Coder was barking about. This should be ready for another round of review!
Comment #6
jamiehollernChris,
No worries regarding the "feature" that I requested; I realise that it can wait until the next branch.
On the subject of licensing, I may have given you the wrong information regarding licenses. You might need to take a look at Why drupal.org doesn't host GPL-"compatible" code and also 3rd party libraries on Drupal.org. It seems that it needs to be GPL licensed code that's included, or else any code should be downloaded by the person installing the module.
Sorry to be a pain, but I'm not an expert on this!
Jamie
Comment #7
chrisfree commentedThanks Jamie,
I decided to rework the plugin support to be optional. Since it is really only needed for legacy browsers, I decided it shouldn't be a requirement to run the module. The latest commit addresses the following:
I have few minor things to tweak, but I'd say this is ready for another review. Thanks so much!
Chris
Comment #8
kenianbei commentedHi Chris,
I've installed Webform Hints and it works as expected out of the box. The module code is fairly straightforward and well written. I couldn't find any security risks.
Looking at the past comments, it looks like you've done a good job of addressing licensing and library issues. So I am tentatively switching status to RTBC, with some minor comments:
Hope your module gets accepted!
Norman
Comment #9
chrisfree commentedNorman,
Thanks for the review and the bump to RTBC status. I'd agree that I think there is room for both modules here. Webform Hints is geared specifically toward Webform-provided forms and allows for easy config. Additionally, the approach here is to use HTML5 placeholders and only use the JS fallback if needed/required.
As for adding the ability to enable/disable Webform Hints on each webform, that's on the list of things to implement! I just pushed up a commit to fix the tabs/spaces issue. I've had this module lying around so long the code still had tabs in it! HaHa!
Thanks again,
Chris
Comment #9.0
chrisfree commentedUpdating module description to accurately reflect changes made during review process.
Comment #10
chrisfree commentedFinally completed 3 reviews of other projects. Adding "PAReview: review bonus" tag. Thanks for all the reviews everyone!
Comment #11
klausiThere is a git tag that has the same name as the branch 7.x-1.x. Make sure to remove this tag to avoid confusion.
Comment #12
chrisfree commentedKlausi,
I deleted those tags. Thanks for the review.
Chris
Comment #13
chrisfree commentedSwitching to "needs review" again. Thanks!
Comment #14
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxchrisfree1128558git
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #15
chrisfree commentedFixed up all of the automated review issues. Moving back to RTBC. Thanks again!
Comment #16
klausimanual review:
Otherwise looks almost ready. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #17
chrisfree commentedJust pushed up fixes recommended by klausi. Ready for review again.
Comment #17.0
chrisfree commentedAdded 2 more reviews of other projects.
Comment #18
chrisfree commentedCompleted 3 more reviews, added to the initial issue post. Re-adding review bonus tag.
Comment #18.0
chrisfree commentedAdded three more reviews.
Comment #19
klausiLooks RTBC now! Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to zzolo as he might have time to take a final look at this.
Comment #20
klausino objections for more than a week, so ...
Thanks for your contribution, chrisfree!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #21
chrisfree commentedThanks klausi!
Comment #22.0
(not verified) commentedAdd Ventral.org and Simplytest.me.