A td is not a valid child of a form.
Aug 5, 2022
4
Level 1
How to show it is required in table?
I want to validate the fields in a table so that they are not empty, and required.
If empty, (It's required.) should appear near that field.
Here is my code, It shows an alert, but I want to show an It's required. next to the field instead of an alert.
<table>
@foreach($competitions as $competition)
<form action="">
<td class="align-middle">
<p><input type="text" class="form-forecast" required name="" id="" aria-label=""></p>
<p><input type="text" class="form-forecast" required name="" id="" aria-label=""></p>
</td>
<td class="align-middle">
<p><button type="submit" class="btn btn-sm btn-secondary">Registration</button></p>
</td>
</form>
@endforeach
</table>
Please or to participate in this conversation.
