How to customize Registration Page in PowerApps Portal
Registration page needs to be easy and quick to fill. It also needs to cover all the necessary information. Customizing your registration page is the best way you can add all and only necessary features.?
In this blog we will see how to customize the registration page in PowerApps Portal.
To customize the registration page and add fields, follow the below steps:
<script>
$(document).ready(function() {??
????????// Code to add custom first name and last name fields
???????$(‘#ContentContainer_MainContent_MainContent_ShowEmail’).before(‘<div class=”form-group”><label class=”col-sm-4 control-label required” for=”FirstNameTextBox”><span id=”ContentContainer_MainContent_MainContent_FirstNameLabel”><span class=”xrm-editable-text xrm-attribute”><span class=”xrm-attribute-value”>First Name</span></span></span></label><div class=”col-sm-8″><input name=”ctl00$ctl00$ContentContainer$MainContent$MainContent$FirstNameTextBox” type=”text” autocomplete=”off” id=”FirstNameTextBox” class=”form-control” aria-required=”true”></div></div><div class=”form-group”><label class=”col-sm-4 control-label required” for=”LastNameTextBox”><span id=”ContentContainer_MainContent_MainContent_LastNameLabel”><span class=”xrm-editable-text xrm-attribute”><span class=”xrm-attribute-value”>Last Name</span></span></span></label><div class=”col-sm-8″><input name=”ctl00$ctl00$ContentContainer$MainContent$MainContent$LastNameTextBox” type=”text” autocomplete=”off” id=”LastNameTextBox” class=”form-control” aria-required=”true”></div></div>’);
????????//Code to Add Custom ‘Register’ Button
????????$(‘#SubmitButton’).after(‘<input type=”submit” name=”ctl00$ctl00$ContentContainer$MainContent$MainContent$customSubmitButton”?value=”Register” id=”customSubmitButton” class=”btn btn-primary”>’);??????
//Hide the original submit button??????
$(‘#SubmitButton’).hide();
????????//On click of custom registrstion button, save custom fields value in local storage and trigger standard register button to execute further registration process
????????$(“#customSubmitButton”).click(function()
????????{
????????????//Save custom field values in local storage
????????????localStorage.setItem(“firstname”, $(“#FirstNameTextBox”).val());
????????????localStorage.setItem(“lastname”, $(“#LastNameTextBox”).val());
????????????//trigger standard submit click
????????????$(‘#SubmitButton’).click();????
????????????return false;
???????});
});
</script>
领英推荐
$(document).ready(function() {?
????// get values of First name and last name from local storage and set it in profile form fields.
????var firstname= localStorage.getItem(“firstname”);?
????var lastname= localStorage.getItem(“lastname”);?
????if(firstname != undefined && firstname != null && firstname != “”)
????{
????????$(“#firstname”).val(firstname);
????}
????if(lastname != undefined && lastname != null && lastname != “”)
????{
????????$(“#lastname”).val(lastname);
????}
localStorage.clear();???
});
Send Invitation to multiple contacts: