feat: Enhance form fields with autofocus, disabled autocomplete, and placeholders for better UX.

This commit is contained in:
Yoga Pangestu 2026-01-05 15:03:09 +07:00
parent 665d048608
commit a0da450e52
3 changed files with 16 additions and 0 deletions

View File

@ -35,17 +35,21 @@ public function form(Schema $schema): Schema
TextInput::make('site_name') TextInput::make('site_name')
->label('Nama Website') ->label('Nama Website')
->placeholder('Simedkom') ->placeholder('Simedkom')
->autofocus()
->autocomplete(false)
->required() ->required()
->maxLength(255), ->maxLength(255),
Textarea::make('site_description') Textarea::make('site_description')
->label('Deskripsi Website') ->label('Deskripsi Website')
->placeholder('Aplikasi Sistem Media Komunikasi Kabupaten Purwakarta') ->placeholder('Aplikasi Sistem Media Komunikasi Kabupaten Purwakarta')
->autocomplete(false)
->required(), ->required(),
Textarea::make('address') Textarea::make('address')
->label('Alamat') ->label('Alamat')
->placeholder('Jl. Laks. Laut RE. Martadinata No.47') ->placeholder('Jl. Laks. Laut RE. Martadinata No.47')
->autocomplete(false)
->rows(3) ->rows(3)
->required() ->required()
->maxLength(255), ->maxLength(255),

View File

@ -33,14 +33,21 @@ public function form(Schema $schema): Schema
->schema([ ->schema([
TextInput::make('title') TextInput::make('title')
->label('SEO Title') ->label('SEO Title')
->placeholder('simedkom')
->autofocus()
->autocomplete(false)
->helperText('Judul yang muncul di tab browser dan hasil pencarian.'), ->helperText('Judul yang muncul di tab browser dan hasil pencarian.'),
Textarea::make('description') Textarea::make('description')
->label('SEO Description') ->label('SEO Description')
->placeholder('...')
->autocomplete(false)
->helperText('Deskripsi singkat website Anda.'), ->helperText('Deskripsi singkat website Anda.'),
TextInput::make('keywords') TextInput::make('keywords')
->label('SEO Keywords') ->label('SEO Keywords')
->placeholder('keyword1, keyword2, keyword3')
->autocomplete(false)
->helperText('Gunakan koma untuk memisahkan kata kunci.'), ->helperText('Gunakan koma untuk memisahkan kata kunci.'),
]) ])
->columnSpanFull(), ->columnSpanFull(),

View File

@ -36,21 +36,26 @@ public function form(Schema $schema): Schema
TextInput::make('facebook') TextInput::make('facebook')
->label('Facebook') ->label('Facebook')
->placeholder('https://facebook.com/username') ->placeholder('https://facebook.com/username')
->autofocus()
->autocomplete(false)
->url(), ->url(),
TextInput::make('twitter') TextInput::make('twitter')
->label('Twitter') ->label('Twitter')
->placeholder('https://twitter.com/username') ->placeholder('https://twitter.com/username')
->autocomplete(false)
->url(), ->url(),
TextInput::make('instagram') TextInput::make('instagram')
->label('Instagram') ->label('Instagram')
->placeholder('https://instagram.com/username') ->placeholder('https://instagram.com/username')
->autocomplete(false)
->url(), ->url(),
TextInput::make('youtube') TextInput::make('youtube')
->label('YouTube') ->label('YouTube')
->placeholder('https://youtube.com/username') ->placeholder('https://youtube.com/username')
->autocomplete(false)
->url(), ->url(),
]), ]),
]) ])