mixhtml
PUT & PATCH EXAMPLES
Update an item
In this example, an "item" will be updated inmediately after the user clicks on the
"Update" button. The item name "Super item" will be updated with the data in the
input field.
Request
<span id="item_name">Super item</span>
<form mix-put="items">
<input name="item_name" type="text">
<button>
Create
</button>
</form>
Response
<browser
mix-update="#item_name"
mix-fade-1000>
New item name
</browser>
Update an item while typing
In this example, an "item" will be updated after the user stops typing in the input field for
one second. The request will be triggered automatically after the mentioned time.
Request
<span id="item_name">Super item</span>
<input
mix-put="items"
mix-input
mix-delay="1000"
name="item_name"
type="text">
Response
<browser
mix-update="#item_name"
mix-fade-1000>
New item name
</browser>