agentsclimarketplace

Create form tab layout

Skill jeffsenso/prestashop-skills/skills/prestashop-module-development/ps9-core-ai/Component/Forms/skills/create-form-tab-layout

Create a multi-tab form layout using PrestaShop's NavigationTabType. This is a specific pattern for complex forms with many fields organized by tabs — NOT the default form layout. Most forms do not need tabs. Trigger: "create tab layout for {Domain} form", "add tabs to {Domain} form".From its SKILL.md

Install
npx -y skills add jeffsenso/prestashop-skills --skill create-form-tab-layout

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.8 KB, 324 tokens by cl100k_base, as published. Nobody here has run it

create-form-tab-layout

This is NOT the default form pattern. Most entity forms are simple single-page forms using TranslatorAwareType or AbstractType. Only use NavigationTabType when the entity has many fields that benefit from tab organization (e.g. Carrier with general, shipping, size/weight tabs).

Instructions

  1. In root {Domain}Type, declare NavigationTabType as the parent type via getParent():
    public function getParent(): string
    {
        return NavigationTabType::class;
    }
    
    Then in buildForm(), add each tab as a sub-form — each child is rendered as a tab.
  2. Create one form type per tab: {Domain}GeneralTabType.php, {Domain}ShippingTabType.php, etc.
  3. Each tab type extends TranslatorAwareType with its own buildForm() containing only that tab's fields.
  4. Tab anchor IDs (used for JS error scrolling) are derived from the tab names.

Reference: src/PrestaShopBundle/Form/Admin/Shipping/Carrier/CarrierType.php, src/PrestaShopBundle/Form/Admin/Sell/Product/EditProductFormType.php

Rules

Conventions (NavigationTabType is PS-specific, tab anchor IDs for JS error nav) are in Forms/CONTEXT.md. Skill-specific reminders:

  • Each tab gets its own form type class for maintainability
  • Tab titles must use $this->trans() for translation

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.