The label for attribute should have the input id value as shown below
<label for="foo">Foo:</label> <input id="foo">
Now to omit the for and id attributes completely, please put input inside label as shown below
<label> Foo: <input name="foo"> </label>
Also please note input cannot be hidden like <input type="hidden"> but it can be styled as hidden <input style="display:none">
If you follow above approach then your issue will be resolved.
Also note, that input cannot be hidden <input type="hidden">, however it can be styled as hidden <input style="display:none">
<input type="hidden">
<input style="display:none">
<label for="field-id" style="line-height:24px;">Your Name</label><br> <input type="text" id="field-id">
The for attribute of a <label> must refer to the id attribute of a form input.
for
<label>
id
<label for="email-field">Email</label> <input name="email" id="email-field" type="text" />
<label for="email-field">Email</label> <input name="email" id="email" type="text" />