Hello Andrew!
I tried your instructions, but does not work:
MyMember.php
class MyMember extends DataObjectDecorator {
public function updateMemberFormFields(&$fields) {
$fields->removeByName('Email');
$fields->push(new EmailField('Email', 'Email address22'));
}
_config.php
Object::add_extension('Member', 'MyMember');
http://127.0.0.1/dev/build?flush=all
I have verified that the field has been changed, since it show 'Email address22', however, the field email continues to accept any text, it does not check to be a valid mail.
To verify that I had no problem in another part of my project I created a sample form (manually) that included a EmailField.
In that form everything works perfectly, and this field (EmailField) only accepts valid email formats, besides, in that form automatically works the javascript validation (client-side), while in the memberprofiles module it does not work.
It is obviously a problem of the memberprofiles module, not of my project.
Maybe I need to configure something else in the memberprofiles module?
What can be happening?
Do I have to do something more in order that it works?
Please, help, thanks,
Regards,
Jose