Skip to content

Latest commit

 

History

History
43 lines (34 loc) · 1.08 KB

fieldset.md

File metadata and controls

43 lines (34 loc) · 1.08 KB

Fieldset Field

Represents <fieldset> element used to group several controls. Documentation:

Usage Example

Widget:

echo Fieldset::widget()->content(
    Field::text($profileForm, 'firstName')->useContainer(false),
    "\n",
    Field::text($profileForm, 'lastName')->useContainer(false),
);

or

echo Fieldset::widget()->begin()
    . "\n"
    . Field::text($profileForm, 'firstName')->useContainer(false)
    . "\n"
    . Field::text($profileForm, 'lastName')->useContainer(false)
    . "\n"
    . Fieldset::end()

Result will be:

<div>
    <fieldset>
        <label for="profileform-firstname">First name</label>
        <input type="text" id="profileform-firstname" name="ProfileForm[firstName]" value>
        <label for="profileform-lastname">Last name</label>
        <input type="text" id="profileform-lastname" name="ProfileForm[lastName]" value>
    </fieldset>
</div>