basic math in form fields

basic math in form fields

Greetings,

I'm having a problem with something that should be simple.

I have a form with two text fields and a check box.

If I put a number into the first text box I want it to be copied to the second text box.  If I tick the check box I want the number in the first text box to be divided by 12 and put in the second text box.

Thank you.