tardigrades / sexy-field-form
SexyField Form. Generate symfony forms based on section configuration.
Installs: 2 746
Dependents: 2
Suggesters: 1
Security: 0
Stars: 0
Watchers: 3
Forks: 3
Open Issues: 0
Requires
- php: ^7.4
- doctrine/orm: ^2.5.6
- php-coveralls/php-coveralls: ^1.0
- symfony/config: ^4
- symfony/dependency-injection: ^4
- symfony/form: ^4
- symfony/security: ^4
- symfony/validator: ^4
- symfony/yaml: ^4
- twig/extensions: ^1.5.1
- twig/twig: ^2.0
Requires (Dev)
- mikey179/vfsstream: ^1.6
- mockery/mockery: ^1.0
- phpunit/phpunit: ^7.0
- squizlabs/php_codesniffer: ^3.2
- tardigrades/sexy-field: dev-master
- tardigrades/sexy-field-field-types-base: dev-master
This package is auto-updated.
Last update: 2024-12-21 20:36:18 UTC
README
SectionField Form
This is part of the (sexy-field-bundle)[https://github.com/dionsnoeijen/sexy-field-bundle] for Symfony. It adds support for rendering out the forms for sections. It's also required by the sexy-field-api component.
Rendering an 'edit' form can be done as follows:
{% set form = sectionForm(section, {slug:formSlug}) %}
Omit the slug
parameter for a create form.
After that, you can refer to the (Symfony form documentation)[http://symfony.com/doc/current/forms.html]
{{ form_start(form) }}
<div class="row">
<div class="col-md-12">
{{ form_errors(form) }}
</div>
</div>
<div class="row">
<div class="col-md-10">
{{ form_widget(form) }}
</div>
</div>
{{ form_end(form) }}