Did you ever get a solution to this? I am wanting to do something very similar on one of these calculators.
Plugin Author
John U
(@john-u)
If you copy calculator code for you site directly from our website at http://www.calculatorpro.com you can add default values to inputs.
For instance, the code for the Commission Calculator is:
<div class="cp-calc-widget" data-calcid="1470" data-anchor="6" data-hash="6077"></div><a href="http://www.calculatorpro.com/calculator/commission-calculator/">Online Calculator</a><script src="//www.calculatorpro.com/wp-content/plugins/calcs/js/widgetV4.min.js"></script>
You can then add a comma delimited string for default values. Leave a section blank to have no default values.
data-defaultvalues=",5"
So the code will appear as:
<div class="cp-calc-widget" data-calcid="1470" data-anchor="6" data-defaultvalues=",5" data-hash="6077"></div><a href="http://www.calculatorpro.com/calculator/commission-calculator/">Online Calculator</a><script src="//www.calculatorpro.com/wp-content/plugins/calcs/js/widgetV4.min.js"></script>
Then the calculator will load with the default value pre-injected. See the screenshot (the 5 was loaded automatically). http://screencast.com/t/gyecd84Xr6v
is there a way to do this such that the user can’t change the rate? Your screenshot looks like they can just remove the 5 and insert a different value.
Plugin Author
John U
(@john-u)
I’m afraid for the time being we don’t have a way to drop in a default value that the user cannot change.
We do have plans in the future to allow admins to hardcode certain values for inputs in such a way that the user can’t change it. Check back with http://www.calculatorpro.com in a month or two and see what updates we’ve done!