AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Create Twig Form Template

skill-jeffsenso-prestashop-skills-create-twig-form-template · by jeffsenso

>

No reviews yet
0 installs
26 views
0.0% view→install

Install

$ agentstack add skill-jeffsenso-prestashop-skills-create-twig-form-template

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-jeffsenso-prestashop-skills-create-twig-form-template)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Create Twig Form Template? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

create-twig-form-template

Read @.ai/Component/Twig/CONTEXT.md for template conventions (layout, flash messages, routes, form themes).

1. Form template

Create src/PrestaShopBundle/Resources/views/Admin/{Section}/{Domain}/form.html.twig:

{% extends '@PrestaShop/Admin/layout.html.twig' %}

{% block content %}
  {{ form_start(form) }}
    {{ form_widget(form) }}
    
      {{ 'Save'|trans({}, 'Admin.Actions') }}
    
  {{ form_end(form) }}
{% endblock %}
  • Always use a single form_widget(form) — see [Twig/CONTEXT.md](../../CONTEXT.md) for why (module hook compatibility)
  • The same template typically serves both create and edit — the controller passes different form data
  • For file uploads, add enctype="multipart/form-data" (see CONTEXT.md)

Reference: src/PrestaShopBundle/Resources/views/Admin/Improve/International/Tax/ (simple), src/PrestaShopBundle/Resources/views/Admin/Sell/Catalog/Manufacturer/ (with image)

2. Form theme overrides (only if needed)

When specific fields need custom rendering beyond Symfony defaults:

  • Preferred: set the form_theme option directly on the form (PrestaShop custom option) — usually in the controller when building the form, or in the form type's configureOptions(). Symfony picks up the theme automatically; no {% form_theme %} directive needed in the Twig file.
  • Fallback: use the Twig directive when the override is template-specific:

{% form_theme form 'Admin/{Section}/{Domain}/{domain}_theme.html.twig' %}

  • Override the field block: {% block _{field_id}_widget %}...{% endblock %}
  • Common case: image preview next to upload field with a "Remove" checkbox

Form themes are scoped to this form only — no global side effects.

3. JS asset inclusion

If the form needs JavaScript (for initComponents or Vue):

{% block javascripts %}
  {{ parent() }}
  
{% endblock %}

The asset path must match the webpack entry name.

Rules

Conventions (layout, path(), single form_widget(form), NavigationTabType auto-rendering, file upload enctype, form theme block naming, JS asset inclusion) are in [Twig/CONTEXT.md](../../CONTEXT.md). Skill-specific reminders:

  • Form theme overrides should be minimal — Symfony's default rendering handles most cases
  • CSRF token is included automatically by form_end(form)

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.