title: How to get value of form field and past it to another form field
body: <p>I am developing HR system, I want to calculate how many days off the employee can take.
  In the HR table I have three attributes.</p>
  
  <p>1- start_date(when the employee starting to work in the company).</p>
  
  <p>2- leavestaken(how many days off the employee took before).</p>
  
  <p>3- leaves(the number of days available for the employee to take off) which equal to=(months between current date and start_date) * 2.5(beacuse each month give 2.5 days off)  - leavestaken</p>
  
  <p>third attribute is automated and not from the user, how I can get the first and second attributive values from field forms, use them in the calculation and save the result in the leaves attribute?  </p>
  
  <p>I'm using sql and this only for server side</p>