From 4dceddcb96a6d1b9c54da710a4cc9faa99fbd78c Mon Sep 17 00:00:00 2001 From: pxpm Date: Tue, 10 Jun 2025 12:27:55 +0100 Subject: [PATCH] wip --- 7.x-dev/base-components.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/7.x-dev/base-components.md b/7.x-dev/base-components.md index 6f198f7..b0a9a7c 100644 --- a/7.x-dev/base-components.md +++ b/7.x-dev/base-components.md @@ -68,6 +68,36 @@ The datatable will pick up everything that in your `setupListOperation()`. You c
+ +### Form + +Show a form anywhere you would like. The form component allow you to display a form for your entities anywhere you would like, by using two distinct components: FormComponent and FormModalComponent. The Form Component displays the form right where there component is defined, while Form Modal Component display the form in a modal and uses ajax to retrieve the fields and validate/submit the form. + +```html + +operation="create" +formMethod="post" +:formAction="url('my_custom_form_handler') +/> +``` + +The Modal Form works by generating a button where the admin can click to open the form modal. + +```html + +operation="create" +formMethod="post" +:formAction="url('my_custom_form_handler') +modalTitle="Create an Invoice" +buttonText="Create Invoice" +buttonClass="btn btn-primary" +/> +``` +
### Menu Separator