Juju
Juju
FFilament
Created by Juju on 10/16/2024 in #❓┊help
$data does not contain Detail Data from Repeater
end up using handleRecordCreation(array $data) and mutateFormDataBeforeCreate(array $data) I wonder why is array $data doesn't contain the detail data from the repeater?? below is my repeater code:
Repeater::make('details')
->label('')
->relationship('details')
->minItems(1)
->validationMessages([
'min' => 'Harus ada minimal 1 data pemesan',
])
->schema([
TextInput::make('details.name')
->label('Nama Pemesan')
->autocapitalize('words')
->minLength(3)
->validationAttribute('Nama pemesan')
->validationMessages([
'min' => ':attribute harus lebih dari 3 karakter',
'required' => ':attribute tidak boleh kosong',
])
->required()
->autofocus(),
])
Repeater::make('details')
->label('')
->relationship('details')
->minItems(1)
->validationMessages([
'min' => 'Harus ada minimal 1 data pemesan',
])
->schema([
TextInput::make('details.name')
->label('Nama Pemesan')
->autocapitalize('words')
->minLength(3)
->validationAttribute('Nama pemesan')
->validationMessages([
'min' => ':attribute harus lebih dari 3 karakter',
'required' => ':attribute tidak boleh kosong',
])
->required()
->autofocus(),
])
2 replies
FFilament
Created by Juju on 10/14/2024 in #❓┊help
How to change the Fields Color
critical 1 line
16 replies
FFilament
Created by Juju on 10/14/2024 in #❓┊help
How to change the Fields Color
lol
16 replies
FFilament
Created by Juju on 10/14/2024 in #❓┊help
How to change the Fields Color
No description
16 replies
FFilament
Created by Juju on 10/14/2024 in #❓┊help
How to change the Fields Color
thanks for the help
16 replies
FFilament
Created by Juju on 10/14/2024 in #❓┊help
How to change the Fields Color
i forgot to input 1 line in the tailwind.config.js
16 replies
FFilament
Created by Juju on 10/14/2024 in #❓┊help
How to change the Fields Color
you're right
16 replies
FFilament
Created by Juju on 10/14/2024 in #❓┊help
How to change the Fields Color
my bad
16 replies
FFilament
Created by Juju on 10/14/2024 in #❓┊help
How to change the Fields Color
OMG
16 replies
FFilament
Created by Juju on 10/14/2024 in #❓┊help
How to change the Fields Color
here is my form definition
public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name')
->extraInputAttributes(['class' => 'text-black px-1 block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6'])
->label('Nama Pemesan')
->autocapitalize('words')
->minLength(3)
->validationAttribute('Nama pemesan')
->validationMessages([
'min' => ':attribute harus lebih dari 3 karakter',
'required' => ':attribute tidak boleh kosong',
])
->autofocus(),
Select::make('district_id')
->relationship(name: 'district', titleAttribute: 'name')
->label('Distrik / Wilayah')
->placeholder('silahkan pilih distrik / wilayah')
->extraAttributes(['class' => 'appearance-none'])
->markAsRequired(false)
->required(),
->statePath('data')
->model(Transaction::class);
}
public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name')
->extraInputAttributes(['class' => 'text-black px-1 block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6'])
->label('Nama Pemesan')
->autocapitalize('words')
->minLength(3)
->validationAttribute('Nama pemesan')
->validationMessages([
'min' => ':attribute harus lebih dari 3 karakter',
'required' => ':attribute tidak boleh kosong',
])
->autofocus(),
Select::make('district_id')
->relationship(name: 'district', titleAttribute: 'name')
->label('Distrik / Wilayah')
->placeholder('silahkan pilih distrik / wilayah')
->extraAttributes(['class' => 'appearance-none'])
->markAsRequired(false)
->required(),
->statePath('data')
->model(Transaction::class);
}
16 replies
FFilament
Created by Juju on 10/14/2024 in #❓┊help
How to change the Fields Color
I pretty much follow the Installation steps
16 replies
FFilament
Created by Juju on 10/14/2024 in #❓┊help
How to change the Fields Color
Hi, thank you for the reply
16 replies