Get values from several inputs&select
Hello jQ-People,
I'm new in jQuery and for my study i want to make a webapp that send to DB BBQ recipe by a from.
Client goal: Complete form to creat a BBQ recipe !
Client need to: add ingredient name (input)+ Measure (input) + unity of measure (select)
Client can: add several line of ingredient, each line is 1 ingredient
My problem: I want to get in an array (for exemple) each line of ingredient like
Arr [
"Apple", "3", "Kg"
"Beef", "500", "gr"
....
]
My goal send the objet to the database.
I have strictly no idea how to do it... I tried some code but nothing make sense and works
Please please please help me ! I have a lot of to do with this project and i'm totaly stuck !
Body code: (it's primitive)
- <ul >
<li id="list">
Nom de l'ingrédient:
<input type="text" id="ingredientName" pattern=".{3,}" required title="Ingrédient requis" />
Mesure:
<input type="number" id="measurement" min="1" />
Unité:
<select name="unitOfMeasure" id="unityMenu" style="width:100px">
<option value="" disabled selected>Choose Unity</option>
</select>
</li>
</ul>
<button id="list_add">Ajouter</button>