Home Demos Proforms

Paypal Enhanced Demo

Privacy: Submitted data will not be stored or used!

This form demonstrates the enhanced Paypal features established since version 1.3.

Since version 1.3 you can use user submission for quantity and amount.

Also a new feature is the tax calculation by percentage.

 

Please note that the FRONTEND calculations are not built in by default!

What you see here is a custom JavaScript which calculates and displays subtotal, vat and total!

 

DO NOT TRANSFER MONEY BY THIS FORM! YOU WILL GET NO REFUND!

 

 

 

Generated with MOOJ Proforms Version 1.3
* Required information.
Quantity Please enter the quantity
Amount You can also let users apply the amount per unit. <br/>Please enter cents separated by a dot e.g. (99.50)
--------------------------------------------------
Subtotal This field is just for the Javascript calculation. <br/>It isn't used for the paypal function.
19% VAT This field is just for the Javascript calculation. <br/>It isn't used for the paypal function.
--------------------------------------------------
Total This field is just for the Javascript calculation. <br/>It isn't used for the paypal function.
Email * Please enter your email address
Message
Characters left:
Proforms
Reload

This is the frontend calculation JavaScript:

	var qtyField = dojo.byId("m4j-177");
	var amountField = dojo.byId("m4j-178");
	var subTotalField = dojo.byId("m4j-181");
	var vatField = dojo.byId("m4j-184");
	var totalField = dojo.byId("m4j-186");
	
	subTotalField.disabled= "disabled";
	vatField.disabled= "disabled";
	totalField.disabled= "disabled";

	qtyField.value = qtyField.value || 1;
	amountField.value = amountField.value || 0;

	function calculate(){
		var qty = parseInt(qtyField.value) || 1; 
		var amount = parseFloat(amountField.value) || 0;
		var subTotal = Math.round(qty * amount * 100)/100 ;
		subTotalField.value = subTotal;
		var tax =  Math.round( ( subTotal / 100 * 19) * 100)/100 ;
		vatField.value = tax; 
		totalField.value = ( subTotal + tax );
		
	}

	dojo.connect(qtyField,"onkeydown",calculate);
	dojo.connect(amountField,"onkeydown",calculate);

	dojo.connect(qtyField,"onkeyup",calculate);
	dojo.connect(amountField,"onkeyup",calculate);
	
	calculate();
	
dojo.addOnLoad(function(){
	dojo.query(".m4j_submit")[0].onmousedown= function(){
		calculate();
		subTotalField.disabled= "";
		vatField.disabled= "";
		totalField.disabled= "";
	};
});

Drop Selection Module

profiles-free-download

bookmarks Bookmarks
© 2024 Mad4Media. All rights reserved.

www.mooj.org is not affiliated with or endorsed by the Joomla!® Project or Open Source Matters.
The name Joomla!® is employed in "fair use"

Joomla Extension Tags

Joomla forms Joomla file manager