Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问多选,支持联动么 #5840

Open
zj611 opened this issue Nov 28, 2023 · 0 comments
Open

请问多选,支持联动么 #5840

zj611 opened this issue Nov 28, 2023 · 0 comments

Comments

@zj611
Copy link

zj611 commented Nov 28, 2023

单选select支持传参数q,联动查询其他字段。请问多选multipleSelect也支持类似的功能吗?

虽然checkbox支持多选联动,但只支持固定类型的options(如下),不支持根据多选的数据进行查表。

$form->checkbox('nationality', '国籍')
    ->options([
        1 => '中国',
        2 => '外国',
    ])->when([1, 2], function (Form $form) { 

        $form->text('name', '姓名');
        $form->text('idcard', '身份证');

    })->when('has', 2, function (Form $form) { 

        $form->text('name', '姓名');
        $form->text('passport', '护照');

    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant