As you can see, I have a form with many dishes ( dishes are loaded from DB and the quantity may vary ).
I wrote a simple JS that changes input when button is clicked., but I have 2 problems:
User reloads the page to sort dishes ( I can't do anything about it ) and input just disappears. I there any way to save the input near multiple dishes, for example, in
localStorage
and clear it when the form is submitted.Is there any way to count the price of an order ( price * value ) so that user can see it before confirming.
My JS knowledge are too poor for this task, but it's crucial for me to pass my backend test for a job and I have literally hours left.
CodePudding user response: