^Back To Top
  
  
  

Warning: Trying to access array offset on value of type null in /home/calculatormall/public_html/components/com_fss/views/kb/view.html.php on line 402

Knowledge Base - How do I change default values for a specific calculator?

You can change any default values for a calculator by editing the calculator's specific PARAMS file. Each calculator should have a file with the extension Params.js. For example, the Mortgage Loan Calculator uses the files that begin with "MortgageLoan". All default parameters are contained within the file MortgageLoanParams.js. Edit this file to change values. For example, the file will start with the following parameters defined:

KJE.parameters.set("INTEREST_RATE",KJE.Default.RateFix30); 
KJE.parameters.set("LOAN_AMOUNT",KJE.Default.MortgageAmt); 
KJE.parameters.set("PREPAY_TYPE",KJE.MortgageLoanCalculation.PREPAY_NONE); 
KJE.parameters.set("PREPAY_STARTS_WITH",1); 
KJE.parameters.set("PREPAY_AMOUNT","0"); 
KJE.parameters.set("TERM",15);

To change any default, simply edit the value in each parameter line. For example, to change the default term from 15 to 30 change 15 to 30 in the TERM line:

Replace 
KJE.parameters.set("TERM",15);

With: 
KJE.parameters.set("TERM",30);

Some parameter values use global defaults that can be modified for all calculators that use them in one location. But these can be changed for a specific calculator simply replacing the default value variable with the actual value you wish to use. For example to change the default loan amount to $100,000 for this calculator you would edit the line:

Replace 
KJE.parameters.set("LOAN_AMOUNT",KJE.Default.MortgageAmt);

With: 
KJE.parameters.set("LOAN_AMOUNT",100000);

Please note that for larger numbers do not include dollars signs or commas. Decimals are acceptable where appropriate. Any changes you make to a Params file is kept intact when you apply an update, these changes will not be overwritten or require you to recreate them after applying an update.

User Comments

Copyright © 2024. CalculatorMall.com All Rights Reserved.

Auto Unlock Service and Auto Lockout Services