(Multi-Page) E-Sign Agreement and Send to Both Parties

Cody Larson 02 Dec, 2009
I have used ChronoForms before in Joomla 1.0 when it was very basic. I setup a basic email form and had no issues, I absolutely loved the extension. I'm using Joomla 1.5 now to rebuild an existing website and am going to be redoing a form that is used for allowing back-end users to input a client's data into a form and then pull that data into the agreement on the second page where clients can then read and agree to a service agreement. However, now I am in a more powerful version of both Joomla and ChronoForms. I now feel like I'm at square one. I have much to learn and have been reading over these forums for days teaching myself as much as possible. I know little about forms, php and databases.

What I want to do is take advantage of how powerful ChronoForms is all while making everything more streamlined and easier for both back-end users and clients. Essentially what I need is a way to be able to take any given price have a back-end user input it with some other basic data and then have that populate on a form on the next page that has the agreement where they can then agree and go about their business. Eventually I will tie Community Builder into it with user accounts, but for now I just want this thing to work.

Currently what we've been doing is having a back-end input the data on the first form, which then takes them to the second form. We then save that second form as a .html file in the browser and email the client the file to open in their browser and agree to the agreement that way. Which then e-mails us the confirmation with their electronic pin used to sign it. Everything is very basic and was not exactly setup all that well.

I want to eliminate having to save the agreement and send it via email. In a perfect world everything would happen through the website. I would also like to have the client input all of their own data if possible minus the price. The back-end user would input that and have the client go to their agreement with whatever price is used.

Here is the link for the current form. It has stopped working so there is that much more pressure on me to figure this out.

http://greatwhitemarketing.biz/gwmlocalseoprograms.html/

Here is the code for the various files that make it up. They are done in ASP.

gwmlocalseoprograms.html:
<script type="text/JavaScript">





// Declaring required variables



var digits = "0123456789";



// non-digit characters which are allowed in phone numbers



var phoneNumberDelimiters = "()- ";



// characters which are allowed in international phone numbers



// (a leading + is OK)



var validWorldPhoneChars = phoneNumberDelimiters + "+";



// Minimum no of digits in an international phone no.



var minDigitsInIPhoneNumber = 10;







function isInteger(s)



{   var i;



    for (i = 0; i < s.length; i++)



    {   



        // Check that current character is number.



        var c = s.charAt(i);



        if (((c < "0") || (c > "9"))) return false;



    }



    // All characters are numbers.



    return true;



}







function stripCharsInBag(s, bag)



{   var i;



    var returnString = "";



    // Search through string's characters one by one.



    // If character is not in bag, append to returnString.



    for (i = 0; i < s.length; i++)



    {   



        // Check that current character isn't whitespace.



        var c = s.charAt(i);



        if (bag.indexOf(c) == -1) returnString += c;



    }



    return returnString;



}







function checkInternationalPhone(strPhone){



s=stripCharsInBag(strPhone,validWorldPhoneChars);



return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);



}



<!--

function validate()



{



var plan=document.form1.plan.value;

var setupfee=document.form1.setupfee.value;

var monthly=document.form1.monthly.value;

var client=document.form1.client.value;



var company=document.form1.company.value;

var site=document.form1.site.value;

var address=document.form1.address.value;

var city=document.form1.city.value;



var state=document.form1.state.value;

var zip=document.form1.zip.value;

var country=document.form1.country.value;

var phone=document.form1.phone.value;



var credit_card_type=document.form1.credit_card_type.value;









if(plan=="")



{



alert("Please select plan !");



document.form1.plan.focus();



return false



}

if(setupfee=="")



{



alert("Please enter setupfee !");



document.form1.setupfee.focus();



return false



}

if(monthly=="")



{



alert("Please enter your monthly fee !");



document.form1.monthly.focus();



return false



}

if(client=="")



{



alert("Please enter client name !");



document.form1.client.focus();



return false



}

if(company=="")



{



alert("Please enter your business !");



document.form1.company.focus();



return false



}

if(site=="")



{



alert("Please enter URL !");



document.form1.site.focus();



return false



}

if(address=="")



{



alert("Please enter your billing address !");



document.form1.address.focus();



return false



}

if(city=="")



{



alert("Please enter your city !");



document.form1.city.focus();



return false



}

if(state=="")



{



alert("Please enter your state !");



document.form1.state.focus();



return false



}

if(zip=="")



{



alert("Please enter zip !");



document.form1.zip.focus();



return false



}

if(country=="")



{



alert("Please enter country !");



document.form1.country.focus();



return false



}

if(phone=="")



{



alert("Please enter phone!");



document.form1.phone.focus();



return false



}

if(credit_card_type=="")



{



alert("Please select credit card type!");



document.form1.credit_card_type.focus();



return false



}





document.form1.submit;



}



</script>

</head>

<body oncontextmenu="return false;" BGCOLOR=#ffffff LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>

<table style="height: 500px;" align="center" width="472">

<tbody>

<tr>

<td align="right" width="526" height="500">

 

  <img src="image002.jpg" width="372" height="95"><br>

  <br><br><br>

    

 

<form name="form1" method="post" action="gwmlocalseoprogramsformfilled.asp" onSubmit="return validate()">

  <span style="font-size:12px; font-weight:bold;">Program Selection:</span>

<select name="plan">

<option value=""> PICK A PLAN</option>
<option value="1">Launch Elite</option>
<option value="2">Launch Diamond </option>
<option value="3">Launch Platinum</option>
<option value="4">Launch Gold</option>
<option value="5">Monthly Dominate</option>
<option value="6">Monthly Aggressive</option>
<option value="7">Monthly Competitive</option>
<option value="8">Monthly Foundational</option>
<option value="9">Custom Video</option>

</select>

<br />

<br />

 

Program Setup Fee: 

<input name="setupfee" maxlength="15" tabindex="1" type="text" />

<br />

<br />

Program Monthly: 

<input name="monthly" maxlength="10" tabindex="1" type="text" />

<br />

<br />

  </b>

  <hr /><b><br /> 

Client Name: <input name="client" maxlength="100" tabindex="2" type="text" /><br /><br />

Business: <input name="company" maxlength="100" tabindex="3" type="text" /><br /><br /> 

URL: <input name="site" maxlength="100" tabindex="4" type="text" /><br /><br />

Billing Address: <input name="address" maxlength="100" tabindex="5" type="text" /><br /><br /> 

City: <input name="city" maxlength="100" tabindex="6" type="text" /><br /><br />

State: <input name="state" maxlength="2" tabindex="7" type="text" /><br /><br /> 

Zip: <input name="zip" maxlength="5" tabindex="8" type="text" /><br /><br /> 

Country: <input name="country" maxlength="100" tabindex="9" type="text" /><br /><br /> 

Phone: <input name="phone" maxlength="12" tabindex="10" type="text" /><br /><br /><hr /><br><br>



<img src="cc.gif" width="179" height="30"><br><br>



<strong> <span style="font-size:12px; font-weight:bold;">Credit card type:</span>

   

    <select name="credit_card_type">
    <option value="Visa ">Visa</option>
	<option value="MasterCard">MasterCard</option>
	<option value="AMEX">AMEX</option>
	<option value="Discover">Discover</option>
	<option value="N/A">N/A</option>

    </select>

  

      </strong><br />

    <br />

 <span style="font-size:12px; font-weight:bold;">Credit card #:</span>

  <input name="card1" type="text" tabindex="8" size="4" maxlength="4" />  

<input name="card2" type="text" tabindex="8" size="4" maxlength="4" />  

<input name="card3" type="text" tabindex="8" size="4" maxlength="4" />  

<input name="card4" type="text" tabindex="8" size="4" maxlength="4" />

<br /><br />



 <span style="font-size:12px; font-weight:bold;">Exp. Date:</span> 

 <input name="exp_date_month" type="text" tabindex="8" size="2" maxlength="2" />  

<input name="exp_date_year" type="text" tabindex="8" size="4" maxlength="4" />  



<br /><br />	



 <span style="font-size:12px; font-weight:bold;">CVC #:</span> 

 

<input name="cvc" type="text" tabindex="8" size="4" maxlength="4" />  



<br /><br />	



<input type="hidden" name="send" value="send" />

<input value="Submit" tabindex="12" type="submit" /> 





</form>


gwmlocalseoprogramsformfilled.asp
<script type="text/JavaScript">





// Declaring required variables



var digits = "0123456789";



// non-digit characters which are allowed in phone numbers



var phoneNumberDelimiters = "()- ";



// characters which are allowed in international phone numbers



// (a leading + is OK)



var validWorldPhoneChars = phoneNumberDelimiters + "+";



// Minimum no of digits in an international phone no.



var minDigitsInIPhoneNumber = 10;







function isInteger(s)



{   var i;



    for (i = 0; i < s.length; i++)



    {   



        // Check that current character is number.



        var c = s.charAt(i);



        if (((c < "0") || (c > "9"))) return false;



    }



    // All characters are numbers.



    return true;



}







function stripCharsInBag(s, bag)



{   var i;



    var returnString = "";



    // Search through string's characters one by one.



    // If character is not in bag, append to returnString.



    for (i = 0; i < s.length; i++)



    {   



        // Check that current character isn't whitespace.



        var c = s.charAt(i);



        if (bag.indexOf(c) == -1) returnString += c;



    }



    return returnString;



}







function checkInternationalPhone(strPhone){



s=stripCharsInBag(strPhone,validWorldPhoneChars);



return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);



}



<!--

function validate()



{



var name=document.form1.name.value;

var ssn=document.form1.ssn.value;

var email=document.form1.email.value;









if(name=="")



{



alert("Please enter name !");



document.form1.name.focus();



return false



}

if(ssn=="")



{



alert("Please enter ssn !");



document.form1.ssn.focus();



return false



}

if(email=="")



 {



	alert("Please enter your email ..!!!");



	document.form1.email.focus();



	return false



	}



 if (document.form1.email.value.length>0)



	{



 	i=document.form1.email.value.indexOf("@")



 	j=document.form1.email.value.indexOf(".",i)



 	k=document.form1.email.value.indexOf(",")



 	kk=document.form1.email.value.indexOf(" ")



 	jj=document.form1.email.value.lastIndexOf(".")



	 len=document.form1.email.value.length



	 if((i>0)&&(j>(1+1))&&(k==-1)&&(kk==-1)&&(len-jj>=2))



	 //&&(len-jj<=3))



	 {



	 //document.cform.ConfirmEmail.focus();//



	 }



	 else



	 {



	 	alert("Please enter an exact email address.\n" + document.form1.email.value + " is invalid.");



		document.form1.email.focus();



	return false



	 }



	 } 







document.form1.submit;



}



</script>

<%
plan = request.form("plan")
%>

<form name="form1" method="post" action="http://www.greatwhitemarketing.net/mail.asp" onSubmit="return validate()">

<table width="87%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">

<tr>

    

    <td colspan="2"> </td>

  </tr>

  

 

  <tr>

    <td colspan="2" align="center"><img src="http://www.greatwhitemarketing.net/image002.jpg" width="372" height="95"></td>

  </tr>

  <tr>

    <td width="50%"> </td>

    <td width="50%"> </td>

  </tr>

   <tr>

    

    <td colspan="2" align="center"><strong>Great White Marketing:</strong></td>

  </tr>

  <tr>

    

    <td colspan="2" align="center"><strong>New Service Agreement.</strong></td>

  </tr>

  <tr>

    

    <td colspan="2"> </td>

  </tr>

  <tr>

    

    <td colspan="2"> </td>

  </tr>

  <tr>

    <td align="right"><strong>Program  Selection:         </strong></td>
    
    <td>
	<%
	Select Case Request.Form("Plan")
	Case 1
		response.write("Launch Elite")
	Case 2
		response.write("Launch Diamond")
	Case 3
		response.write("Launch Platinum")
	Case 4
		response.write("Launch Gold")
	Case 5
		response.write("Monthly Dominate")
	Case 6
		response.write("Monthly Aggressive")
	Case 7
		response.write("Monthly Competitive")
	Case 8
		response.write("Monthly Foundational")
	Case 9
		response.write("Custom Video")
	End Select
	%>
	<!--?php if($plan==1){
	echo 'Launch Elite';
	}elseif($plan==2) {
	echo 'Launch Diamond';
	}elseif($plan==3) {
	echo 'Launch Platinum';
	}elseif($plan==4) {
	echo 'Launch Gold';
	}elseif($plan==5) {
	echo 'Monthly Dominate';
	}elseif($plan==6) {
	echo 'Monthly Aggressive';
	}elseif($plan==7) {
	echo 'Monthly Competitive';
	}elseif($plan==8) {
	echo 'Monthly Foundational';
	}elseif($plan==9) {
	echo 'Custom Video';
	}
	
	?-->
</td>

  </tr>

  <tr>

    <td align="right"><strong>Program Setup Fee:         </strong></td>

    <td><%=request.form("setupfee")%></td>

  </tr>

  <tr>

    <td align="right"><strong>Program Monthly Fee:         </strong></td>

    <td><%=request.form("monthly")%></td>

  </tr>

  <tr>

    <td align="right"><strong>Client Name:         </strong></td>

    <td><%=request.form("client")%></td>

  </tr>

  <tr>

    <td align="right"><strong>Company Name:         </strong></td>

    <td><%=request.form("company")%></td>

  </tr>

  <tr>

    <td align="right"><strong>Website URL:         </strong></td>

    <td><%=request.form("site")%></td>

  </tr>

  <tr>

    <td align="right"><strong>Billing Address:         </strong></td>

    <td><%=request.form("address")%></td>

  </tr>

  <tr>

    <td align="right"><strong>Phone Number:        </strong></td>

    <td><%=request.form("phone")%></td>

  </tr>

   <tr>

    

    <td colspan="2"> </td>

  </tr>

  <tr>

    <td colspan="2" align="center"><strong>Payment Method</strong></td>

  </tr>

  <tr>

    

    <td colspan="2"> </td>

  </tr>

  <tr>

    <td align="right"><strong>Credit card type:</strong>      </td>

    <td><%=request.form("credit_card_type")%></td>

  </tr>

  <tr>

    <td align="right"><strong>Credit card #:         </strong></td>

    <td>**** **** **** <%=request.form("card4")%></td>

  </tr>

  <tr>

    <td align="right"><strong>Exp. Date:        </strong></td>

    <td><%=request.form("exp_date_month")%> / <%=request.form("exp_date_year")%></td>

  </tr>

  <tr>

    <td align="right"><strong>CVC#:          </strong></td>

    <td><%=request.form("cvc")%></td>

  </tr>

  
   <tr>

    

    <td colspan="2"> </td>

  </tr>

   

  <tr>

    <td align="right">*Full Name:</td>

    <td><input name="name" maxlength="100" tabindex="2" type="text" /></td>

  </tr>

   <tr>

    

    <td colspan="2"> </td>

  </tr>

  <tr>

    <td align="right">*Last 4 of your SSN#: </td>

    <td><input name="ssn" maxlength="100" tabindex="2" type="text" /></td>

  </tr>

   <tr>

    

    <td colspan="2"> </td>

  </tr>

  <tr>

    <td align="right">*Your Email:  </td>

    <td><input name="email" type="text" tabindex="2" size="50" maxlength="100" /></td>

  </tr>

  

  <tr>

    

    <td colspan="2"> </td>

  </tr>

  <tr>

    <td colspan="2" align="center">**  <strong><strong>By Clicking Below You Agree That The Information Above Is Correct</strong><br>

    **  <strong>And You Agree To The Terms Of Service:<strong></strong></td>

  </tr>

  <tr>

    

    <td colspan="2"> </td>

  </tr>

  <tr>

    <td colspan="2"><div align="center">

   <textarea cols="80" rows="15">

<%if plan = 1 or plan = 2 or plan = 3 or plan = 4 then%>
Launch Program Agreement
<%end if%>
<%if plan = 5 or plan = 6 or plan = 7 or plan = 8 then%>
Montly Program Agreement

<%end if
if plan = 9 then%>
Video Program Agreement
<%end if%>

</textarea>

    </div></td>

  </tr>

  

   <tr>

    

    <td colspan="2"> </td>

  </tr>

  <tr>

    

    <td align="center" colspan="2"><input  type="submit" value="I Agree " name="submit"/><input type="hidden" name="send" value="send" />

	

	

	<input type="hidden" name="plan" value="<%=request.form("plan")%>" />

	<input type="hidden" name="setupfee" value="<%=request.form("setupfee")%>" />

	<input type="hidden" name="monthly" value="<%=request.form("monthly")%>" />

	<input type="hidden" name="client" value="<%=request.form("client")%>" />

	<input type="hidden" name="company" value="<%=request.form("company")%>" />

	<input type="hidden" name="site" value="<%=request.form("site")%>" />

	<input type="hidden" name="address" value="<%=request.form("address")%>" />

	<input type="hidden" name="city" value="<%=request.form("city")%>" />

	<input type="hidden" name="state" value="<%=request.form("state")%>" />

	

	<input type="hidden" name="zip" value="<%=request.form("zip")%>" />

	<input type="hidden" name="country" value="<%=request.form("country")%>" />

	<input type="hidden" name="phone" value="<%=request.form("phone")%>" />

	<input type="hidden" name="credit_card_type" value="<%=request.form("credit_card_type")%>" />

	

	<input type="hidden" name="credit_card_type" value="<%=request.form("credit_card_type")%>" />

	<input type="hidden" name="card4" value="<%=request.form("card4")%>" />

	<input type="hidden" name="exp_date_month" value="<%=request.form("exp_date_month")%>" />

	<input type="hidden" name="exp_date_year" value="<%=request.form("exp_date_year")%>" />

	<input type="hidden" name="cvc" value="<%=request.form("cvc")%>" />

	

	

	

	

	

	

	

	

	

	

	

	

	

	

	

	</td>

  </tr>

  <tr>

   

    <td colspan="2"> </td>

  </tr>

  <tr>

    

    <td colspan="2"> </td>

  </tr>

</table>

 </form>


mail.asp
<%

emailto = request.form("email")
'emailto = "linusjohn@yahoo.com"
emailcc = "contact@greatwhitemarketing.net"
emailbcc = "linusjohn@yahoo.com"

Select Case Request.form("plan")
Case 1
	Plan = "Launch Elite"
Case 2
	Plan = "Launch Diamond"
Case 3
	Plan = "Launch Platinum"
Case 4
	Plan = "Launch Gold"
Case 5
	Plan = "Monthly Dominate"
Case 6
	Plan = "Monthly Aggressive"
Case 7 
	Plan = "Monthly Competitive"
Case 8
	Plan = "Monthly Foundational"
Case 9
	Plan = "Custom Video"
End Select

 message = "<table width='90% border='0' cellspacing='2' cellpadding='2' align='center' style='font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#003366;'>"&_
"<tr><td colspan='2'>Dear Admin, please find Inquiry Information<br><br></td></tr>"&_
"<tr><td >Program  Selection:</td><td>"&Plan&"</td></tr>"&_
"<tr><td>Program Setup Fee:</td><td >"&request.form("setupfee")&"</td></tr>"&_
"<tr><td>Program Monthly Fee:</td><td >"&request.form("monthly")&"</td></tr>"&_
"<tr><td >Client Name:</td><td >"&request.form("client")&"</td></tr>"&_
"<tr><td >Company Name:</td><td >"&request.form("company")&"</td></tr>"&_
"<tr><td >Website URL:</td><td >"&request.form("site")&"</td></tr>"&_
"<tr><td >Billing Address:</td><td >"&request.form("address")&"</td></tr>"&_
"<tr><td >Phone Number:</td><td >"&request.form("phone")&"</td></tr>"&_
"<tr><td  colspan=2> </td></tr>"&_
"<tr><td  colspan=2><strong>Payment Method</strong></td></tr>"&_
"<tr><td  colspan=2> </td></tr>"&_
"<tr><td >Credit card type:</td><td >"&request.form("credit_card_type")&"</td></tr>"&_
"<tr><td >Credit card #:</td><td >**** **** ****"&request.form("card4")&"</td></tr>"&_
"<tr><td >Exp. Date:</td><td >"&request.form("exp_date_month")&"-"&request.form("exp_date_year")&"</td></tr>"&_
"<tr><td >CVC#:</td><td >"&request.form("cvc")&"</td></tr>"&_
"<tr><td >Full Name:</td><td >"&request.form("name")&"</td></tr>"&_
"<tr><td >Last 4 of your SSN#:</td><td >"&request.form("ssn")&"</td></tr>"&_
"</table>"

Set objMessage = CreateObject("CDO.Message")
		
		objMessage.to = emailto
		objMessage.cc = emailcc
		objMessage.bcc = emailbcc
		objMessage.From = "contact@greatwhitemarketing.net"
		objMessage.Subject="Inquiry Information"
		objMessage.HTMLBody=message
		
		
		'objMessage.Configuration.Fields.Item _
		'("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
		
		
		'Name or IP of Remote SMTP Server
		'objMessage.Configuration.Fields.Item _
		'("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "deliver.mc.yu.edu"
		
		'Server port (typically 25)
		'objMessage.Configuration.Fields.Item _
		'("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
		
		'objMessage.Configuration.Fields.Update
		'==End remote SMTP server configuration section==
		
		objMessage.Send
		Set objMessage = Nothing
response.redirect("ordersubmittedthankyou.asp")

%>


I have been reading up on the multi-page plugin and I have already gotten that going. I will post links to what I have so far shortly.
Max_admin 05 Dec, 2009
Hi Cody,

You say you managed to get the multi page plugin working and I see all you need is a multi page form, so, where is the problem exactly ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.