Buy Now
function shippingRequiredPayFast (formReference) {
let cont = true;
for( let i = 0; i < formReference.elements.length; i++ ) {
if( formReference.elements[i].className !== 'shipping' )
continue;
if( formReference.elements[i].name === 'line2' )
continue;
if( !cont )
continue;
if( formReference.elements[i].name === 'country' ) {
if( formReference.elements[i].selectedIndex === 0 ) {
cont = false;
alert ( 'Select a country' );
}
} else{
if( 0 === formReference.elements[i].value.length || /^\s*$/.test( formReference.elements[i].value ) ) {
cont = false;
alert ( 'Complete all the mandatory address fields' );
}
}
}
if( !cont ) {
return cont;
}
}
function customQuantitiesPayFast (formReference) {
formReference[‘amount’].value = formReference[‘amount’].value * formReference[‘custom_quantity’].value;
return true;
}
function actionPayFastJavascript ( formReference ) {
let shippingValid = shippingRequiredPayFast( formReference );
let shippingValidOrOff = typeof shippingValid !== ‘undefined’ ? shippingValid : true;
let customValid = shippingValidOrOff ? customQuantitiesPayFast( formReference ) : false;
if (typeof shippingValid !== ‘undefined’ && !shippingValid) {
return false;
}
if (typeof customValid !== ‘undefined’ && !customValid) {
return false;
}
return true;
}
Enjoy the best design and functions combined together.
Buy the complete application now
This option gives you the application at a low fee payable once-off at only R899.00