Changes

Custom Combined Sign-Up Page

4,172 bytes removed, 17:58, 12 July 2017
Blanked the page
'''The method below is no longer recommended''' as it involves hardcoding information. To create an organization and contact at the same time use [[Creating_a_System_Generated_Organization_and_Contact_signup_page|Creating a System Generated Organization and Contact signup page]]
 
To create a Custom Combined Sign-Up Page (also known as a hybrid sign-up page), follow the instructions below:
 
Note: A basic understanding of HTML and JavaScript is required to complete this task.
 
1. Create a '''Company Signup''' page within [[SmartSimple]]. Remember to set (as required):
 
* The '''mandatory''' and '''optional''' standard fields.
 
* The company '''categories'''.
 
* Insert the '''sample sign-up''' and '''confirmation''' template - required to save the page.
 
* Click the '''Activate Page''' option button.
 
* Set the '''Name Check''' field as appropriate (update profile or create new profile).
 
* Click the '''Save''' button.
 
2. Create a '''Contact Signup''' page within [[SmartSimple]]. Remember to set (as required):
 
* The '''mandatory''' and '''optional''' standard fields.
 
* The contact [[Role|roles]].
 
* Insert the '''sample sign-up''' and '''confirmation''' template - required to save the page.
 
* Click the '''Activate Page''' option button.
 
* Set the '''Email Check''' field as appropriate (update profile or create new profile).
 
* Set the '''Enable Login''' - if required.
 
* Click the '''Save''' button.
 
3. View the HTML source of both '''signup''' pages and join them together as desired.
 
* Ensure there is only one form tag (see below), with action: '''/s_cpsignup.jsp'''
 
* Both the '''ctoken''' from the company sigup and '''ptoken''' from the contact signup pages must be present. Example:
 
<form action='/s_cpsignup.jsp' method='POST' onsubmit='return sb(this);'>
 
&lt;!-- this must be company signup page token --&gt;
 
<input type=hidden name=ctoken value="XVtQHUUGYFpfRBdfXxJSRlNZYg%3D%3D">
 
&lt;!-- this must be contact signup page token --&gt;
 
<input type=hidden name=ptoken value="XVtQC1oGYFpfRBdfXxJSRlNZYg%3D%3D">
 
* Ensure there is only one Submit button.
 
* If your Company and Contact signup pages both have a standard phone field. Leave the company field as is and rename the input for the contact phone to “uphone” example:
 
<input type=text class='Large' name='uphone' id='uphone'>
 
* The JavaScript validations for the "Contact Signup" and "Company Signup" should both be executed when submit is clicked.
 
4. With a new '''Restrict Duplicate Emails''' functionality (May 2013 upgrade [[Upgrades]]) when enabled on system sign up page by selecting '''Do not update profile for existing user''' you can look at the compiled source code and take out the script that use to check the duplicate and paste it into your smart folder hybrid page. The part of the code that you will need is the following within the sb(frm) function:
 
var paramrs=new in_ssRecordSet();paramrs.addfieldnames("pageid,matchvalue");
var idx=paramrs.getnewrecnumber();
paramrs.addfieldvaluebyname(idx,"pageid",'''pageid''');
paramrs.addfieldvaluebyname(idx,"matchvalue",'''matchvalue''');
if (!SS_UTADuplicateCheck(false,'',0,'''entityid''','0','0',paramrs)) {
return false;
}
 
 
'''pageid''': can be found on the sign up page url
 
'''matchvalue''': field to validate. Ex. frm.email.value OR frm.cname.value
 
'''entityid''': 30 for company, 40 for contact
 
Also, make sure you include the javascript file "/Ajax/uta/in_uta.js" on the page as well
 
Note: the duplicate check script above will be different based on different settings on the signup page, so you cannot just copy and paste the code above for all signup page. You have to look into the source of each individual signup page you are referencing.
 
5. '''Save''' the page.
 
6. Create a web enabled [[Smart Folder]] and store the modified page in the folder.
 
7. Select the [[URL]] for this file through the '''File Options'''.
 
8. Use this [[URL]] as the link in the website.
 
==See Also==
 
* [[Creating_a_System_Generated_Organization_and_Contact_signup_page|Creating a System Generated Organization and Contact signup page]]
 
 
[[Category:System Management]][[Category:Sign-Up Features]]
Smartstaff, administrator
4,478
edits