I have a popup model with following fields
- name
- comment box
- submit button with input type=”button”
I displayed this form in a popup model.
Now I need to validate these fields. Is there any solution to validate these input fields in magento 2?
<form>
<h3>Feedback form</h3>
<label>Name:</label><input type="text" name="name" id="name">
<label>Email:</label><input type="email" name="email" id="email">
<label>Suggestion:</label>
<select name="selectname" id="suggestion">
<option value="">--Select--</option>
<option value="on product">On product</option>
<option value="on delivery">On delivery</option>
<option value="on usability">On usability</option>
<option value="criticism">Criticism</option>
<option value="others">Others</option>
</select>
<label>Comments:</label><textarea rows="4" cols="50" id="comments"></textarea>
<input type="button" value="submit" id="feedbackBtn">
</form>
</div>