Skip to content

Add id attribute to hidden inputs

Compare
Choose a tag to compare
@bgaze bgaze released this 10 Dec 18:36
· 19 commits to master since this release
  • Moved flattenName function to HasSettings trait.
  • As for others inputs, add id attribute to hidden inputs if missing.
@hidden('hidden1')
@hidden('hidden2', 'some-value', ['id' => 'custom-id'])

Generated HTML:

<input id="hidden1" name="hidden1" type="hidden">
<input id="custom-id" name="hidden2" type="hidden" value="some-value">