Skip to content

Any way to retrieve the current active tab from a tabs form component? #11375

Answered by StaffCollab
StaffCollab asked this question in Help
Discussion options

You must be logged in to vote

The final solution was to run some js within the filament class, so it should evaluate the query string while creating the form and fetch the current tab from it.

Here is the code.

    public ?string $tab;

    public function form(Form $form): Form
    {
        return $form
            ->schema([
                Tabs::make('tabs')
                    ->schema([
                        Tab::make('Single donation')
                            ->schema([
                                //
                            ]),
                        Tab::make('Recurring donation')
                            ->schema([
                                //
                            ]),
          …

Replies: 5 comments 7 replies

Comment options

You must be logged in to vote
5 replies
@danharrin
Comment options

@StaffCollab
Comment options

@danharrin
Comment options

@StaffCollab
Comment options

@dharen008
Comment options

Comment options

You must be logged in to vote
1 reply
@JonathanVorich
Comment options

Answer selected by StaffCollab
Comment options

You must be logged in to vote
1 reply
@StaffCollab
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
7 participants