• Resolved 5mart4zz

    (@5mart4zz)


    hi,
    I found out that UM registration form has a type=text for e-mail field, and I would need to change it to email in order to synchronize with my crm tool.

    – 1 > is there a technical important reason why you set it up to text instead of email ?
    – 2 > is it possible to change it ?

    I can’t use a custom field with that type, as the “email” type does not exist in UM, and I am afraid that just changing the “type” value to “email” in the php function defining predefined fields in builtin will just break everything 😉

    thanks for your help

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @5mart4zz

    You can use this code snippet to change the type to email. But you still have to fix the style after adding this code snippet:

    add_filter('um_get_field__user_email', function( $data ){
    
        $data['input'] = 'email';
        
        return $data;
    });

    CSS

    .um.um-register input[data-key="user_email"]{
        position: relative;
        padding: 15px 0 0 0;
        width: 100%;
        border: 0px;
    }

    Regards,

    Thread Starter 5mart4zz

    (@5mart4zz)

    thanks, just to be absolutely sure to do it the best way: where do you recommand I use this code ?
    I will let you know if it works

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @5mart4zz

    You can add the PHP code in your theme’s functions.php file or use the Code Snippet plugin. For the CSS, you can add it to your theme’s style.css

    Regards,

    Thread Starter 5mart4zz

    (@5mart4zz)

    Hi, thanks a lot for your help and quick responses, it worked perfectly 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to set e-mail field type to “email” ?’ is closed to new replies.