Posted by alanburke on August 31, 2010 at 11:19pm
| Project: | HTML5 Tools |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
The form at user/[uid]/edit should use an email form element.
It seems, according to [#316886] that a form_alter won't cut it here.
Haven't worked it out yet, mabe somebody else wil have a pointer.
Comments
#1
Hi alanburke,
thanks for the feature request. The more the merrier :)
Regarding this issue, the form can be alter using hook_user (http://api.drupal.org/api/function/hook_user)
It'll look something like this (note I just threw this together, it will not work, the brackets should be check to make sure they're balance.The form array might be wrong, I'm sure there's something else in there and is not just 'mail'. But this should point you in the right direction :-) )
function hook_user($op, &$edit, &$account, $category = NULL) {if ($op == 'form' && $category == 'account') {
$form['mail']['#type'] = 'emailfield';
);
return $form
}
#2
No Joy.
I get a warning from elements module.
Fatal error: Unsupported operand types in projects/html5toolsdev-6/sites/all/modules/elements/elements.module on line 141Patch attached as a start for anybody else.
#3
Here's a working patch.
#4
Does the trick for me.
Good work.
#5
changing status because of alanburke's comment above ^^
#6
committed to HEAD
#7
Automatically closed -- issue fixed for 2 weeks with no activity.