WordPress.org

Ready to get started?Download WordPress

Forums

CalculatorPro Calculators
[resolved] can i put the % in the commission box & hide it (5 posts)

  1. poshforeclosures
    Member
    Posted 2 years ago #

    i would like to be able to set the commission at 2% and hide the commission box, so that when a visitor enters the amount of sale, it generates the calculated 2%

    http://wordpress.org/extend/plugins/calculatorpro-calculators/

  2. scampisi
    Member
    Posted 1 year ago #

    Did you ever get a solution to this? I am wanting to do something very similar on one of these calculators.

  3. John U
    Member
    Plugin Author

    Posted 1 year ago #

    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

  4. scampisi
    Member
    Posted 1 year ago #

    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.

  5. John U
    Member
    Plugin Author

    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic