mardi 24 mars 2015

Dynamically update field value in Rails form

I have a form in my ruby app which has a field total_hours_spent and different fields for breakup of the various activities like design_hours, analysis_hours, coding_hours etc.. I am looking for a mechanism where as soon as all the break up hours fields are filled, the total hours field should be updated dynamically. Sad thing is I dont know Ajax or Jquery. I know javascript but don't know how to use it with rails.


So what I am doing now is once the user submits the form, the values are calculated and then stored in the data base. Is there a way to dynamically display the field value using only rails?


Aucun commentaire:

Enregistrer un commentaire