Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Populate Email in username and Hide Email field on Registration Page in CRM Portals

Posted on by Microsoft Employee

Hi Experts,

when the user redeems the invitation, I want to populate user's Email in Username field and Hide that email field and lock username field on the Registration page. I am not able to find the page and control of email, username fields on the registration page of CRM Portal.

Thanks.

*This post is locked for comments

  • learnincommunity Profile Picture
    learnincommunity 50 on at
    RE: Populate Email in username and Hide Email field on Registration Page in CRM Portals

    Hi Arpit Shrivastava,

    I am tried the same code. It hides the email field but doesn't display email as username in the username field. Do I need to change anything else?

    Thanks

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Populate Email in username and Hide Email field on Registration Page in CRM Portals

    Perfect. It is working as expected.

  • Verified answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Populate Email in username and Hide Email field on Registration Page in CRM Portals

    Hi Rohini,

    Create a new Content Snippet with the name: Account/Register/PageCopy, and paste below code under Copy/HTML control.

    <script>
    $(document).ready(function () {
    var email = $('#ContentContainer_MainContent_MainContent_EmailTextBox').val();
    $('#ContentContainer_MainContent_MainContent_UserNameTextBox').val(email);
    $("#ContentContainer_MainContent_MainContent_UserNameTextBox").attr('readonly', 'readonly');
    $("#ContentContainer_MainContent_MainContent_ShowEmail").hide();

    });

    </script>

    If my answer helped to resolve your issue, kindly verify it by clicking 'Yes'. It would be helpful to the other community members seeking to resolve a similar issue.

    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.in

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans