Changes

Jump to: navigation, search

Converting Fields To Contacts

2,799 bytes added, 17:32, 16 November 2009
no edit summary
3. Create a '''HTML''' document to act as the '''Combined Sign-up page'''.
[[Image<pre><html><head><title>My combined signup</title></head><body>Put any instructions here ...... <form action="/s_cpsignup.jsp" method="POST" name=frmsignup onsubmit='return sb(this);'>  <input type=hidden name='defaultrole' value=""><input type=hidden name='roleupdatetype' value="0"><input type=hidden name='accessrole' value="0"><input type=hidden name='enablelogin' value="0"><input type=hidden name='scope' value="1"><input type=hidden name='folderid' value="0"><input type=hidden name='companyid' value=""><input type=hidden name='rootcompanyid' value="">  <table border=0 cellpadding=0 cellspacing=0 class=Form><tr><th class=Form>Firstname:</th><td class=Form><input type=text value="" class='Large' name='firstname' id='firstname' ></td></tr><tr><th class=Form>Lastname:SignUpHTML.PNG]]</th><td class=Form><input type=text class='Large' value="" name='lastname' id='lastname'></td></tr> <tr><td>&nbsp;</td><td><input type=submit class=Button value='Submit'></td></tr></table> <!-- this must be the company signup page token ---> <input type=hidden name=ctoken value=""> <!-- this must be the person signup page token ---> <input type=hidden name=ptoken value=""> </form>  </body></html></pre>
4. Modify the token references to the two tokens noted in steps 1 and 2.
[[Image:Signup.png]]<pre><!-- this must be the company signup page token ---> <input type=hidden name=ctoken value="XVtQHU12345678"> <!-- this must be the person signup page token ---> <input type=hidden name=ptoken value="XVtDRF98765432"> </pre> 
5. Place the following function in the head of the HTML.
<pre><script language="javascript"> function getParams(){ var idx = document.URL.indexOf('?');var params = new Array(); if (idx != -1) { var pairs = document.URL.substring(idx+1, document.URL.length).split('&'); for (var i=0; i<pairs.length; i++) {nameVal = pairs[i].split('='); params[nameVal[Image:HeaderFunction.PNG0]]= nameVal[1]; }  } return params;  } params = getParams();  </script></pre> 
'''Form Field Population'''
<pre>
<script>
 
var para1=document.getElementById('field1');
var para2=document.getElementById('field2');
 
para1.value = unescape(params["parameter1"]);
para2.value = unescape(params["parameter2"]);
 
</script>
</pre>
[[Image:FormFieldPopulation.PNG]]
'''HTML Element Population'''
<pre>
<script>
 
var para1=document.getElementById('element1');
var para2=document.getElementById('element2');
 
para1.value = unescape(params["parameter1"]);
para2.value = unescape(params["parameter2"]);
[[Image:HTMLElementPopulation.PNG]]</script> </pre>
7. Replace "field1" or "element1" etc. with the actual form or element id name and "parameter1" with the parameter name.
[[Image:ReplaceField<pre>var para1=document.PNG]]getElementById('firstname'); <input type="text" value="" id="firstname"></pre> or <pre>var para1=document.getElementById('firstname'); <div id="firstname"></div> </pre> 
14. In the Variables section paste in the following HTML tags . . .
[[Image:Variables.PNG]]<pre><a href="Sign-Up Page URL?paramenter1=@#Custom Filed Id for parameter 1#@&paramenter1=@#Custom Field Id for parameter 2#@&oppid=@opportunityid@" target="_blank">click here</a> </pre>
Smartstaff, administrator
4,478
edits

Navigation menu