Hey!
I make a food plan, where I am currently working on the ingredient function and I'm having an issue with the durability field.
I plan to have a field where you type a number and then select a value in a field where you choose between days, weeks and months in the "Add ingredient"-form.
The problem is that I'm not sure how to solve it:
I have a table of ingredients where the values are now Ingredient name, price & durability for days.
My best idea was that if you write, for example, a durability of 5 and choose weeks that it multiplies 5 by seven and enter it in the "Durability of days" field in the table.
I guess I need to write code for this, how can it look / how do I?
I make a food plan, where I am currently working on the ingredient function and I'm having an issue with the durability field.
I plan to have a field where you type a number and then select a value in a field where you choose between days, weeks and months in the "Add ingredient"-form.
The problem is that I'm not sure how to solve it:
I have a table of ingredients where the values are now Ingredient name, price & durability for days.
My best idea was that if you write, for example, a durability of 5 and choose weeks that it multiplies 5 by seven and enter it in the "Durability of days" field in the table.
I guess I need to write code for this, how can it look / how do I?