Wordpress plugin for saving calculator form?

by 6 replies
8
Hey guys,

I want to get this form that calculates how much you will save monthly/yearly. I haven't found any plugin that I can customize to look somewhat decent. Anyone know how to do this with javascript?

Mohu Savings Calculator - Mohu
#website design #calculator #form #plugin #saving #wordpress
  • If you really tried to search Google for javascript form calculator tutorial or javascript calculator script you should have found lots of examples.

    But I will try and help you. By inspecting the example you gave, the calculations are done by PHP. Would you like a php or a javascript based calculator? Please post what you want the script to count and by that I mean the mathematical formula.

    Edit: I see you're searching for a WP plugin, but I think easier is just to inject the script into the page you want. UNLESS you need many pages with different calculators.
  • There is NO Worpdress plugin for those simple tasks...
  • Simple real-time one-field calculator:

    - inject jquery inside document head
    - inside body:

    <script type="text/javascript">
    $(document).ready(function(){
    $('#moneySpent').keyup(function(){
    $('#result').text($('#moneySpent').val() * 1.5);
    });
    });
    </script>


    <label>How much do you spend every month on...:</label><input name="moneySpent" id="moneySpent" type="text" />
    <br />
    You could save: &euro; <span id="result"></span>

    -----

    Then style with CSS, for example highlight the result with background-color:...
  • Javascript does not belong in head section... when do you "Professionals" get it?

    Put the JS part before closing body tag.
    • [1] reply
    • Excuse me? Who are you talking to? I only see me providing a script which is in jquery. You CAN include the jquery library inside the head section and sometimes you HAVE TO. I just gave an example which works.


      You should learn some manners, I have not said I am a professional or anything along those lines. I helped the OP. How have you contributed to the discussion?

      Also as you seem to be a PROFESSIONAL yourself, you should know that the above example I gave wouldn't work if the jquery is injected to the bottom... Unless the script goes under it.

      Instead of mouthing off you could have posted that yourself.
  • As you might have seen he is using Wordpress... Wordpress loads jQuery in the head by default.

    Why should I provide a script that can be found with the help of Google?

    Besides that, there is a code function... you should use it.

Next Topics on Trending Feed