Thigah Alattass
Select [all options] of dropdown inside repeater
I tried to use that before, but i did not get the desired result
because the repeater and select is for only one object
so when i assign one feature_id, it works well but i need to assign all features
I will try again
Thank you
13 replies
Select [all options] of dropdown inside repeater
option is already filled according to test_type (which is the value of another dropdown)
but i need them all to be selected and sent when another value is true
for example
I have radio called (select all features)
when it is true, the dropdown becomes disable and all options are sent as selected
when the radio is false, the user can select the desired feature from the dropdown
13 replies
Select [all options] of dropdown inside repeater
I tried to add radio button to choose if i need all features
and tried to adding them using code when the radio returns true
but i couldn't perform that, it always gives me error (feature_id is null) when i submitted the form
13 replies
Dependent select input
The rest of the code
Forms\Components\Section::make('Test features')
->schema(
//static::getFormSchema('features')
[
Forms\Components\Repeater::make('featuresTest')
->relationship()
->schema([
Forms\Components\Select::make('feature_id')
->label('Feature')
->options(function(callable $get){
$type = $get('test_type');
Log::debug($type);
if(!$type){
return ['Please, Enter the type first'];
}
return Feature::where('type',$type);
})
->required()
->reactive()
->columnSpan([
'md' => 7,
]),
8 replies