Removed

Comments

simon georges’s picture

What kind of default value would you put ?
(you can do it using hook_form_alter or theme function for the form, if you don't mind coding)

Anonymous’s picture

Removed

miro_dietiker’s picture

Priority: Normal » Minor

Minor then.

berdir’s picture

The problem is that using the existing value property results in bad Usability because users first need to remove the value before they can insert their own. I know that I've seen a issue that reports exactly this problem for the 6.x-1.x branch, can't find it anymore.

If at all, it should be done using the new HTML 5 placeholder property: http://davidwalsh.name/html5-placeholder and/or a JavaScript fallback mechism.

miro_dietiker’s picture

In general this is a feature that is against accessibility rules (as long as it doesn't follow some fancy new standard...)
Also it can be easily covered in custom code with a form_alter.

I already see people asking in how to customize this message once we added it... ;-)

For HTML4 i clearly vote against such a feature.
For HTML5 and where a standards compliant solution is possible, we should add that support. (BTW: There's absolutely no need to provide a fallback...)
Won't fix if this is risky for some reason. Such a workaround per module would be completely wrong. Changing the paradigm of fapi forms is a global thing, not something for a per-module context.

berdir’s picture

Agreed on the FAPI comment. FAPI is extendable, though. In fact, the html5_tools project already implements and supports the #placeholder property, see #1068634: Placeholder functionality.

So if we implement this, we could just set #placeholder and tell users to install html5_tools if they want it.

And yes, it was already requested in this issue to make that string customizable...

miro_dietiker’s picture

That's cool.

miccelito’s picture

So what would the steps be to add a #placeholder?
1. Install HTML5 Tools http://drupal.org/project/html5_tools and Elements http://drupal.org/project/elements
2. Add ''#placeholder' => t('Your e-mail address...'), to simplenews.subscription.inc file

??

miccelito’s picture

Seems that a quick solution instead of doing overkill by installing extra not needed modules or changing code, could be to use Compact Forms module http://drupal.org/project/compact_forms
Where the only thing you need to do is to add the form id of simplenews and thereafter the label of the input.form-text field will be displayed within the input field, having same effect as a placeholder.

Comments are welcome if you agree or disagree with this solution...

Anonymous’s picture

Title: Allow for adding of default value to the Simplenews block » Removed
Issue summary: View changes