Today I Learned - Rocky Kev

TIL you can wire different inputs to different forms

POSTED ON:

TAGS:

Typically, you create a input element INSIDE your form element.

But what if you have a input field that lives OUTSIDE of that form wrapper?

<form id="myForm" action="/form.php">
<input id="name">
<button type="submit">
</form>

<input type="email" form="myForm">

I can see this being super useful for search boxes.

Via Those HTML Attributes You Never Use via Louis Lazaris


Related TILs

Tagged:

TIL the multiple value in html

The multiple attribute allows the user to enter multiple values on an '<input>'. It is a boolean attribute valid for file or email input types and the '<select>' element.

TIL how to open up your webcam with html

This is done with the 'capture' attribute which can take two values.

TIL using datalist for a pure HTML input suggestion

Web developers do not use the power of 'datalists' enough. It combines the power of a 'selector', with the ability to type out your choice using the keyboard.