Class Fieldset


@Bean(typeName="fieldset") public class Fieldset extends HtmlElementMixed
DTO for an HTML <fieldset> element.

The fieldset element groups related form controls together. It provides a visual and semantic grouping mechanism that helps organize complex forms and improves accessibility. The legend element is typically used as the first child to provide a caption for the fieldset.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple fieldset with legend Fieldset fieldset1 = fieldset( legend("Personal Information"), input("text").name("firstName").placeholder("First Name"), input("text").name("lastName").placeholder("Last Name") ); // Disabled fieldset Fieldset fieldset2 = fieldset( legend("Disabled Section"), input("text").name("disabledField").value("Cannot edit") ).disabled(true); // Fieldset with custom styling Fieldset fieldset3 = fieldset( legend("Contact Details"), input("email").name("email").placeholder("Email"), input("tel").name("phone").placeholder("Phone") )._class("form-group");

The following convenience methods are provided for constructing instances of this bean:

See Also: