Blazor/WPF: Add input line and select line to forms with button click

Viewed 39

I want to add a new...

<input type="text" id="id_item1" name="item1" @bind="@inputValue1" @oninput="OnInputEvent1" ><br>

...to my form by clicking a button. There's a second form, with a <select> and <option>, which also needs to increment by clicking the same button:

<select name="categories" id="cat1" size="1">
    <option value="" disabled selected>- Choose a category -</option>
    <option value="Fruits & vegetables">Fruits & vegetables</option>
    <option value="Baked goods">Baked goods</option>
    <option value="Meat & fish">Meat & fish</option>
    <option value="Dry foods">Dry foods</option>
    <option value="Dairy products">Dairy products</option>
    <option value="Candy & snacks">Candy & snacks</option>
    <option value="Beverages">Beverages</option>
    <option value="Other">Other</option>
</select>

How can I do that?

0 Answers
Related