area17 / twill

Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/cnWk7EFv8R.
https://twillcms.com
Apache License 2.0
3.8k stars 577 forks source link

$additionalFieldset anchor navigation is not displayed in form #2650

Closed HarryThe3rd closed 1 month ago

HarryThe3rd commented 2 months ago

Description

In the form.blade.php for a model, I defined several additionalFieldsets but the anchor navigation is not displayed.

Steps to reproduce

Go to a form.blade.php define some addtional fieldsets like

@extends('twill::layouts.form', [
    'disableContentFieldset' => true,
    'additionalFieldsets' => [
        ['fieldset' => 'baseinfo', 'label' => twillTrans('modules/programs.baseinfo')],
        ['fieldset' => 'structure', 'label' => twillTrans('modules/programs.structure')],
        ['fieldset' => 'contents', 'label' => twillTrans('modules/programs.contents')],
        ['fieldset' => 'seo', 'label' => 'SEO'],
      ],
])

then wrapped the formfields inside the @section('fieldsets') with

@formFieldset(['id' => 'baseinfo', 'title' => twillTrans('modules/programs.baseinfo'), 'open' => true])
    ...
@endformFieldset

Expected result

An anchor navigation should be shown in form of the model.

Actual result

The anchor navigation is not shown.

Versions

Twill version: 3.3.1 Laravel version: 11.22.0 PHP version: 8.3.9 Database engine: MySQL 8.0.27