Calculation


function doValidate_1(form)
{
$dexQuery = jQuery.noConflict();
document.cp_calculatedfieldsf_pform_1.cp_ref_page.value = document.location;
if ($dexQuery(“#hdcaptcha_cp_calculated_fields_form_post_1″).val() == ”)
{
alert(‘Please enter the captcha verification code.’);
return false;
}
var result = $dexQuery.ajax({
type: “GET”,
url: “http://themedicrig.com/wordpress”,
data: {
ps: “_1”,
hdcaptcha_cp_calculated_fields_form_post: $dexQuery(“#hdcaptcha_cp_calculated_fields_form_post_1”).val()
},
async: false
}).responseText;
if (result == “captchafailed”)
{
$dexQuery(“#captchaimg_1”).attr(‘src’, $dexQuery(“#captchaimg_1”).attr(‘src’)+’&’+Date());
alert(‘Incorrect captcha code. Please try again.’);
return false;
}
else {
var cpefb_error = $dexQuery(“#cp_calculatedfieldsf_pform_1”).find(“.cpefb_error:visible”).length;
if (cpefb_error==0)
{
$dexQuery(“#cp_calculatedfieldsf_pform_1”).find(“[name$=’_date’]:disabled”).each(function(){
var v = $dexQuery(this).val(),
name = $dexQuery(this).attr( ‘name’ ).replace(‘_date’, ”),
e = $dexQuery(“[name='”+name+”‘]”); if( e.length ){ e.val( $dexQuery.trim( e.val().replace( v, ” ) ) ); }
});
$dexQuery(“#cp_calculatedfieldsf_pform_1”).find(“select”).children().each(function(){
$dexQuery(this).val($dexQuery(this).attr(“vt”));
});
$dexQuery(“#cp_calculatedfieldsf_pform_1”).find(“input:checkbox,input:radio”).each(function(){
$dexQuery(this).val($dexQuery(this).attr(“vt”));
});
$dexQuery(“#cp_calculatedfieldsf_pform_1”).find( ‘.ignore’ ).closest( ‘.fields’ ).remove();
$dexQuery(“#form_structure_1”).remove();
$dexQuery(“#cp_calculatedfieldsf_pform_1”)[ 0 ].submit();
}
return false;
}
}

form_structure_1=[[{"name":"fieldname5","index":0,"title":"Simple Sum of two numbers","userhelp":"","ftype":"fSectionBreak","csslayout":""},{"name":"fieldname2","index":1,"title":"First Number","userhelp":"","dformat":"number","min":"","max":"","predefined":"3","ftype":"fnumber","csslayout":"","required":false,"size":"small","formats":["digits","number"]},{"name":"fieldname6","index":2,"title":"Second Number","predefined":"2","ftype":"fnumber","userhelp":"","csslayout":"","required":false,"size":"small","min":"","max":"","dformat":"digits","formats":["digits","number"]},{"name":"fieldname4","index":3,"readonly":true,"title":"Sum","predefined":"","userhelp":"Note: Sum of First Number + Second Number","eq":"fieldname2+fieldname6","ftype":"fCalculated","csslayout":"","required":false,"size":"medium"},{"name":"fieldname7","index":4,"title":"Sum of selected fields","userhelp":"","ftype":"fSectionBreak","csslayout":""},{"choices":["Item A: $10","Item B: $20","Item C: $40"],"choiceSelected":[true,true,false],"name":"fieldname8","index":5,"title":"Select\/un-select some items","ftype":"fcheck","userhelp":"","csslayout":"","layout":"one_column","required":false},{"name":"fieldname9","index":6,"title":"Sum of selected items","eq":"fieldname8","ftype":"fCalculated","userhelp":"","csslayout":"","predefined":"","required":false,"size":"medium","readonly":false}],{"0":{"title":"Simple Operations","description":"Below you can test two simple and frequent operations.","formlayout":"top_aligned"},"formid":"cp_calculatedfieldsf_pform_1","setCache":false,"cache":false}];

security code

Submit

wholesale nfl jerseys

“index”:6