Repository navigation
Address
Viames Marino edited this page Mar 26, 2026
·
3 revisions
Pair\Html\FormControls\Address renders a text input specialized for address entry.
- Renders
<input type="text">. - Automatically adds CSS class
googlePlacesAutocomplete. - Sets
size="50"andautocomplete="on". - Supports
minLength()andmaxLength()inherited fromFormControl.
render(): string- Inherited methods from FormControl:
id(),label(),required(),placeholder(),value(),class(),data(),aria(),validate().
No custom validator is defined. Validation uses FormControl::validate() (required, minLength, maxLength).
$address = (new \Pair\Html\FormControls\Address('shippingAddress'))
->label('Shipping address')
->placeholder('Via Roma 10, Milano')
->required()
->minLength(10)
->maxLength(255);
echo $address->render();Address is still a plain text input. Geocoding/autocomplete behavior depends on frontend JS/CSS integration.
For an explicit Google Maps integration with hidden metadata fields, use GoogleAddress.
See also: FormControl, Text, Form.
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4