<div>
<div class="form-control mb-5">
<label class="label" for="my_name">
<span class="label-text">
What is your name?</span>
</label>
<input type="text" class="input input-bordered w-full max-w-xs" name="my_name" id="my_name" placeholder="My name" value="" />
<div class="label"> <span class="label-text-alt text-warning">Alt label</span>
</div>
</div>
<div class="form-control mb-5">
<label class="label" for="my_name">
<span class="label-text">
What is your name?</span>
</label>
<input type="text" class="input input-bordered w-full max-w-xs" name="my_name" id="my_name" placeholder="My name" value="" />
<div class="label"> <span class="label-text-alt text-warning">Alt label</span>
<span class="label-text-alt">Alt label</span>
</div>
</div>
</div>
<div>
@jrmc.form.control()
@!jrmc.form.label({ text: 'What is your name?', for: 'my_name' })
@!jrmc.form.input({ name: 'my_name', placeholder: 'My name', id: 'my_name', class: ['input-bordered', 'w-full', 'max-w-xs'] })
@!jrmc.form.hint({ as: 'div', text: 'Alt label'})
@end
@jrmc.form.control()
@!jrmc.form.label({ text: 'What is your name?', for: 'my_name' })
@!jrmc.form.input({ name: 'my_name', placeholder: 'My name', id: 'my_name', class: ['input-bordered', 'w-full', 'max-w-xs'] })
@jrmc.form.label({ as: 'div' })
<span class="label-text-alt text-warning">Alt label</span>
<span class="label-text-alt">Alt label</span>
@end
@end
</div>
Doc : daisyui control
Control is a container field.
Class name | Type | |
---|---|---|
form-control | Component | Container element |