Created
August 3, 2019 09:35
-
-
Save nenad-mitic-bg/7d0dc5fbf0551ed1e0e484837e88214f to your computer and use it in GitHub Desktop.
For Medium article "Symfony EasyAdmin: complex forms" - example that works
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
easy_admin: | |
entities: | |
Purchase: | |
class: App\Entity\Purchase | |
controller: App\Controller\Admin\PurchaseController | |
disabled_actions: ['delete'] | |
list: | |
actions: [ { name: 'show', icon: 'shopping-basket' } ] | |
fields: ['guid', 'buyer', 'deliveryDate', 'deliveryHour', 'billingAddress', 'purchasedItems', 'total'] | |
form: | |
fields: | |
- { type: 'group', label: 'Delivery Details', icon: 'truck', css_class: 'col-sm-4' } | |
- deliveryDate | |
- deliveryHour | |
- { type: 'divider' } | |
- | |
property: billingAddress | |
type: App\Form\StreetAddressType | |
- { type: 'group', label: 'Purchase Details', icon: 'shopping-cart', css_class: 'col-sm-4' } | |
- { property: 'guid', type_options: { 'disabled': true } } | |
- { property: 'buyer', type: 'easyadmin_autocomplete' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment