SBX - Search With Button

SBX - Forum Post Title

Customizing the Registration CRM Portal Registration Page

Microsoft Dynamics CRM Forum

Kranthi G asked a question on 28 Dec 2017 3:01 PM
My Badges

Question Status

Verified

Hi Team,

We need to add couple of mandatory fields to the user registration page below like DOB, SSN etc. Please let me know the possibility of this and if so how?

Need to add fields to below form.

Thanks

Reply
Kranthi G responded on 29 Dec 2017 3:14 PM
My Badges

<<bringing to top>>

Reply
Megan Walker responded on 30 Dec 2017 10:04 AM
My Badges
Suggested Answer

Hi Kranthi,

I don't believe you are able to change the registration or sign in forms. However, you can edit the profile form. Once registered, the user will be taken to their profile. What about adding your required fields to the profile form, then making those mandatory. You could always add some kind of workflow to follow up with users that haven't completed those fields after a specific amount of time.

To edit the profile form, go to Settings>Customisations>Contact entity. Look for the Profile Web Form and add your fields there. Save and publish. You may also need to restart the portal to see the changes. Hope this helps!

Reply
Arpit Shrivastava responded on 30 Dec 2017 1:20 PM
My Badges
Verified Answer

Hi Kranthi,

Create a Content Snippet record (Portal > Content Snippet >New) with below details:

Name : Account/Register/PageCopy

Website : <website name>

Type : Html

Value: write your own HTML/DOM/JQuery code to add your custom controls and perform validations.

Here is the code snippet:

 

// Code to Add DOB Field
$('#ContentContainer_MainContent_MainContent_ShowUserName').next().next().after('<div class="form-group"><label class="col-sm-4 control-label required"><span id="ContentContainer_MainContent_MainContent_dob"><span class="xrm-editable-text xrm-attribute"><span class="xrm-attribute-value">Date Of Birth</span></span></span></label><div class="col-sm-8"><input id="ContentContainer_MainContent_MainContent_dob" class="form-control" aria-required="true"></div></div>');

 

// Code to Add SSN Field
$('#ContentContainer_MainContent_MainContent_ShowUserName').next().next().after('<div class="form-group"><label class="col-sm-4 control-label required"><span id="ContentContainer_MainContent_MainContent_ssn"><span class="xrm-editable-text xrm-attribute"><span class="xrm-attribute-value">SSN</span></span></span></label><div class="col-sm-8"><input id="ContentContainer_MainContent_MainContent_ssn" class="form-control" aria-required="true"></div></div>');

 

//Code to Add Custom 'Register' Button and Hide the original one

$('#SubmitButton').after('<input type="submit" name="ctl00$ctl00$ContentContainer$MainContent$MainContent$mySubmitButton" value="Register" id="mySubmitButton" class="btn btn-primary">');

 

$('#SubmitButton').hide();

 



//Now you can handle the click of custom 'Register' button.

$("#mySubmitButton").click(function()
{
if(all validation pass)
{

var ssnInput = $('#ContentContainer_MainContent_MainContent_ssn').val();

var dobInput= $('#ContentContainer_MainContent_MainContent_dob').val();

localStorage.setItem("ssn", ssnInput );

localStorage.setItem("dob", dobInput);

$('#SubmitButton').click();
}
else
{
alert('throw error');
}
});

//Above Code Means :

// If all the validation pass then: store SSN and DOB in local storage and trigger click on the actual register button else throw your custom error message.

// We will have to store SSN and DOB in cache/localstorage, because we don't have a direct way to store it in CRM. Other data portal will automatically store in CRM like : Email, Username, Password, Confrm Password.

 

// As soon as user will be redirected to profile page after successful registration, we can write below two line of code in profile webpage (under custom javascript) section to get the SSN and DOB from cache or local storage and put it in profile custom SSN and DOB fields in order to store it in CRM.

$('#profilepage_SSN_field').val(localStorage.getItem("ssn"));

$('#profilepage_DOB_field').val(localStorage.getItem("dob"));

Hope you understood the whole logic. It's not straightforward, but you can follow the above instructions and achieve what you are looking for.

Mark it verified. If it helps.

Cheers

Arpit

Reply
Megan Walker responded on 30 Dec 2017 1:27 PM
My Badges

Love this Arpit. Way better than my response! :-) I've learned something too! Glad to be a part of this post so I saw your answer.

Reply
Kranthi G responded on 3 Jan 2018 9:12 AM
My Badges

Thanks a lot Arpit. This provides an way to achieve the desired funcitonality. Once done will update on this thread. Thanks again.

Reply
Richard Ludwig responded on 17 Jan 2018 10:00 AM

Hello Arpit

Can you show us a html variant or text (i cannot choose jquery)

Reply
Arpit Shrivastava responded on 17 Jan 2018 11:01 AM
My Badges
Suggested Answer

Hi Richard,

Open Content Snippet record, choose HTML and inside value(HTML) editor you can start writing your HTML/JQUERY/JS code :

Cheers

Arpit

Reply
Seeni responded on 20 Jan 2018 12:23 AM
My Badges

Hi Arpit,

I have followed what you have mentioned here.

But, i can see the code in Registration Page what i have written in Content Snippet.

Any idea?

Thanks in Advance.regards,

Seeni.

Reply
Seeni responded on 20 Jan 2018 5:56 AM
My Badges

Hi Arpit,

i can only see the code which i have written in content snippet record. Please look below SS.

Reply
Arpit Shrivastava responded on 20 Jan 2018 6:13 AM
My Badges
Suggested Answer

Hi Seeni,

Please see the below screenshot, you might have copied the code directly in Value(HTML) section, you first need to click on </> then you will get the HTML editor. Paste the code there.

Regards

Arpit

Reply
Seeni responded on 20 Jan 2018 6:33 AM
My Badges

Dear Arpit,

Thank you for your response.

i have pasted code like you did in above SS.But,i am not able to see the newly added columns in Registration Page(Date of birth,SSN).Please help me.

Thanks,

seeni.

Reply
Yoga Ravish responded on 22 Mar 2018 2:28 AM

Hi Arpit, where do i write the code for handling on click of custom 'Register' button? I tried it in the Account/Register/PageCopy html page itself. Correct me if I'm wrong.

Reply
Arpit Shrivastava responded on 22 Mar 2018 4:27 AM
My Badges
Suggested Answer

Hi Yoga,

Yes, you have to write the click event of your custom register button in Account/SignIn/PageCopy iteself.

$("#mySubmitButton").click(function(){

    alert("The paragraph was clicked.");
});

-Regards
Arpit

Reply
Yoga Ravish responded on 25 Apr 2018 2:41 AM

Hey Arpit, I got a requirement to introduce multiple registration forms based on the clients/services in Portals.. Can you please post your thoughts on the same, since i am not able to find anything related to multiple registration forms..

Reply
Arpit Shrivastava responded on 30 Dec 2017 1:20 PM
My Badges
Verified Answer

Hi Kranthi,

Create a Content Snippet record (Portal > Content Snippet >New) with below details:

Name : Account/Register/PageCopy

Website : <website name>

Type : Html

Value: write your own HTML/DOM/JQuery code to add your custom controls and perform validations.

Here is the code snippet:

 

// Code to Add DOB Field
$('#ContentContainer_MainContent_MainContent_ShowUserName').next().next().after('<div class="form-group"><label class="col-sm-4 control-label required"><span id="ContentContainer_MainContent_MainContent_dob"><span class="xrm-editable-text xrm-attribute"><span class="xrm-attribute-value">Date Of Birth</span></span></span></label><div class="col-sm-8"><input id="ContentContainer_MainContent_MainContent_dob" class="form-control" aria-required="true"></div></div>');

 

// Code to Add SSN Field
$('#ContentContainer_MainContent_MainContent_ShowUserName').next().next().after('<div class="form-group"><label class="col-sm-4 control-label required"><span id="ContentContainer_MainContent_MainContent_ssn"><span class="xrm-editable-text xrm-attribute"><span class="xrm-attribute-value">SSN</span></span></span></label><div class="col-sm-8"><input id="ContentContainer_MainContent_MainContent_ssn" class="form-control" aria-required="true"></div></div>');

 

//Code to Add Custom 'Register' Button and Hide the original one

$('#SubmitButton').after('<input type="submit" name="ctl00$ctl00$ContentContainer$MainContent$MainContent$mySubmitButton" value="Register" id="mySubmitButton" class="btn btn-primary">');

 

$('#SubmitButton').hide();

 



//Now you can handle the click of custom 'Register' button.

$("#mySubmitButton").click(function()
{
if(all validation pass)
{

var ssnInput = $('#ContentContainer_MainContent_MainContent_ssn').val();

var dobInput= $('#ContentContainer_MainContent_MainContent_dob').val();

localStorage.setItem("ssn", ssnInput );

localStorage.setItem("dob", dobInput);

$('#SubmitButton').click();
}
else
{
alert('throw error');
}
});

//Above Code Means :

// If all the validation pass then: store SSN and DOB in local storage and trigger click on the actual register button else throw your custom error message.

// We will have to store SSN and DOB in cache/localstorage, because we don't have a direct way to store it in CRM. Other data portal will automatically store in CRM like : Email, Username, Password, Confrm Password.

 

// As soon as user will be redirected to profile page after successful registration, we can write below two line of code in profile webpage (under custom javascript) section to get the SSN and DOB from cache or local storage and put it in profile custom SSN and DOB fields in order to store it in CRM.

$('#profilepage_SSN_field').val(localStorage.getItem("ssn"));

$('#profilepage_DOB_field').val(localStorage.getItem("dob"));

Hope you understood the whole logic. It's not straightforward, but you can follow the above instructions and achieve what you are looking for.

Mark it verified. If it helps.

Cheers

Arpit

Reply
Megan Walker responded on 30 Dec 2017 10:04 AM
My Badges
Suggested Answer

Hi Kranthi,

I don't believe you are able to change the registration or sign in forms. However, you can edit the profile form. Once registered, the user will be taken to their profile. What about adding your required fields to the profile form, then making those mandatory. You could always add some kind of workflow to follow up with users that haven't completed those fields after a specific amount of time.

To edit the profile form, go to Settings>Customisations>Contact entity. Look for the Profile Web Form and add your fields there. Save and publish. You may also need to restart the portal to see the changes. Hope this helps!

Reply
Arpit Shrivastava responded on 17 Jan 2018 11:01 AM
My Badges
Suggested Answer

Hi Richard,

Open Content Snippet record, choose HTML and inside value(HTML) editor you can start writing your HTML/JQUERY/JS code :

Cheers

Arpit

Reply
Arpit Shrivastava responded on 20 Jan 2018 6:13 AM
My Badges
Suggested Answer

Hi Seeni,

Please see the below screenshot, you might have copied the code directly in Value(HTML) section, you first need to click on </> then you will get the HTML editor. Paste the code there.

Regards

Arpit

Reply
Arpit Shrivastava responded on 22 Mar 2018 4:27 AM
My Badges
Suggested Answer

Hi Yoga,

Yes, you have to write the click event of your custom register button in Account/SignIn/PageCopy iteself.

$("#mySubmitButton").click(function(){

    alert("The paragraph was clicked.");
});

-Regards
Arpit

Reply
Arpit Shrivastava responded on 15 Jun 2018 9:42 AM
My Badges
Suggested Answer

Thanks a ton. Means a lot.

Regarding your query, you may refer following article in order to get list of Content Snippet were available for Adxstudio.

Though, few may not worth/supported for CRM Portal that you will have to check.

Hope it helps.

Cheers

Arpit

Reply

SBX - Two Col Forum

SBX - Migrated JS