I have created a form using table layout. My goal is to automatically shift the focus to the next input field once the current one reaches its maximum length. I tried implementing this functionality with jQuery, but it only seems to work with inputs and not with td
elements. Here is the code snippet I used:
$(".inputs").keyup(function () {
var index = $('.inputs').index(this) + 1;
$('.inputs').eq(index).focus();
});
Below is the HTML code for the table
:
<form>
<table>
<tr>
<td class="custom_header">First Name* </td>
<!-- Add more input fields here -->
</tr>
</table>
</form>
Is there a way to submit this form as a Google Form considering it contains multiple input fields?