Horizontal Form Layouts
Horizontal forms arrange form labels and controls in a side-by-side layout, making efficient use of horizontal space while maintaining a clean, organized appearance. This layout pattern is particularly effective for forms with multiple fields, as it allows users to quickly scan labels and their corresponding inputs. With features like input validation, responsive design, and various styling options, horizontal forms provide a professional and user-friendly way to collect data.
Essential Form Layouts
Basic Form
A basic horizontal form with commonly used input fields:
- Name and Email: Essential contact information fields with validation
- Phone: Optional contact field with pattern validation
- Message: Multi-line text area for detailed input
required-field
class.
Form with Icons
Enhanced form design that incorporates icons to provide visual cues for each field:
- Input Groups: Combines icons and form controls for better visual hierarchy
- Visual Indicators: Icons help users quickly identify field types
- Consistent Styling: Maintains a cohesive look with icon integration
Disabled Form
A form in a disabled state that prevents user interaction:
- Fieldset: Uses the disabled attribute to disable all form elements within
- Visual State: Shows grayed-out appearance for all form controls
- Interaction Prevention: Blocks user input while maintaining form layout
Form with Sections
A structured form divided into logical sections for better organization:
- Account Details: Groups username, email, and password fields
- Personal Info: Contains biographical and contact information
- Visual Separation: Uses separators and headings to distinguish sections
Advanced Form Layouts
Form Label Alignment
Demonstrates different approaches to label alignment in forms:
- Right-aligned Labels: Uses text-sm-end class for better visual connection with inputs
- Input Groups: Shows email domain appended to input
- Responsive Design: Maintains readability across different screen sizes
Multi Column Form
A form layout that uses multiple columns to maximize space efficiency:
- Grid System: Utilizes Bootstrap's grid for responsive column layouts
- Field Grouping: Organizes related fields in columns
- Address Form: Common example with street, city, state, and other location fields
Form with Tabs
A tabbed interface that separates form content into manageable sections:
- Personal Info: Basic personal details and preferences
- Account Details: Login and security information
- Social Links: Social media profile connections
- Navigation: Easy switching between form sections using tabs