I am creating a website with a form. The form has three fields; ingredients, quantity and unit.
What I would like to achieve:
When the user enters the ingredient, the unit (unit of measurement) will change to something appropriate, for example
The user will begin entering 'jam' and when the form recognises the word (probably when the 'm' is typed" the unit field will refresh and display 'jar(s)'
Perhaps it would be faster to process or easier if the unit field refreshes when the user clicks on the quantity field.
I need this so that when the user submits the data I will have a database of ingredients with universal units of measurement for the quantities, so it's not displayed as:
Jam 12 Teaspoons
Jam 0.5 Jars
I will create a file hosted on the server with all the associated units, I don't yet know which format to use and was thinking mySQL, cvs or txt but I'm unsure which will be best. I'd rather something lightweight like cvs though.
If anyone could point me in the right direction or give me some idea of where to start I would really appreciate it.
Thanks a lot,
Tom