You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hope someone know the solution or some update needed. Thanks in advance.
I have two fields, one to define list of possible choices, second to choose right answer.
Sadly when adding dynamic taggable values to the first field, second does not receive changed event.
Multiselect::make(('tr.task_choice_options'), 'choice_choices')->hide()->taggable()->saveAsJSON()
->dependsOn(
['task_type'],
function ($field, $request, $formData) {
if ($formData->task_type === TaskTypeEnum::Choice) {
$field->show()->required();
}
}
),
Multiselect::make(('tr.task_choice_options'), 'choice_choice')->hide()->singleSelect()
->dependsOn(
['task_type','choice_choices'],
function ($field, $request, $formData) {
if ($formData->task_type === TaskTypeEnum::Choice) {
$field->options(json_decode($formData->choice_choices))->show()->required();
}
}
)
The text was updated successfully, but these errors were encountered:
Please can you watch for this. I think that is easy to fix because when you removing option with taggable the change event is firing, not working only when adding new tags.
still needed :( checked that current version sends only first change so only first item dynamically entered will be available to select on other multiselect :(
Hi,
Hope someone know the solution or some update needed. Thanks in advance.
I have two fields, one to define list of possible choices, second to choose right answer.
Sadly when adding dynamic taggable values to the first field, second does not receive changed event.
Multiselect::make(('tr.task_choice_options'), 'choice_choices')->hide()->taggable()->saveAsJSON()
->dependsOn(
['task_type'],
function ($field, $request, $formData) {
if ($formData->task_type === TaskTypeEnum::Choice) {
$field->show()->required();
}
}
),
Multiselect::make(('tr.task_choice_options'), 'choice_choice')->hide()->singleSelect()
->dependsOn(
['task_type','choice_choices'],
function ($field, $request, $formData) {
if ($formData->task_type === TaskTypeEnum::Choice) {
$field->options(json_decode($formData->choice_choices))->show()->required();
}
}
)
The text was updated successfully, but these errors were encountered: