diff --git a/development/architecture/migration-guide/forms/CRUD-forms.md b/development/architecture/migration-guide/forms/CRUD-forms.md index ecfb2e6443..c7f9e886e5 100644 --- a/development/architecture/migration-guide/forms/CRUD-forms.md +++ b/development/architecture/migration-guide/forms/CRUD-forms.md @@ -5,6 +5,18 @@ weight: 20 # CRUD Forms +{{% notice tip %}} +If you are looking to customize an identifiable object with a module, please have a look at [Grid and identifiable object form hooks usage example]({{}}). +{{% /notice %}} + +{{% notice tip %}} +If you are looking for the Form component documentation, please have a look at [Forms with Symfony]({{}}). +{{% /notice %}} + +{{% notice tip %}} +This guide is intended for core developers and contributors who want to understand how PrestaShop handles forms in the core. +{{% /notice %}} + ## Introduction In computer programming, _CRUD_ is an acronym for the four basic functions of persistent storage: **create, read, update, and delete**. diff --git a/development/architecture/migration-guide/forms/_index.md b/development/architecture/migration-guide/forms/_index.md index d07f01588e..911bde4f07 100644 --- a/development/architecture/migration-guide/forms/_index.md +++ b/development/architecture/migration-guide/forms/_index.md @@ -59,12 +59,12 @@ PrestaShop provides some built-in Form types that will help you integrate the sp * `TextWithUnitType` * ... -Reference of existing [back office form types can be found here]({{}}). +Reference of existing [back office form types can be found here]({{}}). Most of the components from the PrestaShop UI Kit are implemented as Form Types. {{% notice note %}} -Before creating a new form type, check this folder first to see if the type already exists. +Before creating a new form type, check in the reference or in `src/PrestaShopBundle/Form/Admin/Type` folder first to see if the type already exists. {{% /notice %}} Forms are created and declared [as services](https://symfony.com/doc/4.4/form/form_dependencies.html) that you can use inside your Controllers – this is covered in the [Controllers/Routing section]({{< relref "/8/development/architecture/migration-guide/controller-routing" >}}) of this guide. diff --git a/development/components/form/_index.md b/development/components/form/_index.md index e3f68e5389..1c73a88679 100644 --- a/development/components/form/_index.md +++ b/development/components/form/_index.md @@ -60,6 +60,8 @@ The `FormBuilder` will build the required `Form` with all `Form Types`, and retr The FormDataProvider is responsible for retrieving data from the Database. This data is used to populate the form when editing an existing entity. Additionally, it provides default values for the form fields, both when creating a new entity and when editing an existing one. +[Learn more about CRUD forms and FormDataProviders]({{}}). + ### Form Types Developers have access to a wide range of field types ([see Symfony types](https://symfony.com/doc/4.4/reference/forms/types.html)) that come from the Symfony framework. Additionally, PrestaShop enhances this selection with its own reusable field types. diff --git a/modules/concepts/forms/admin-forms.md b/modules/concepts/forms/admin-forms.md index b0ee69b1d4..102ae6e871 100644 --- a/modules/concepts/forms/admin-forms.md +++ b/modules/concepts/forms/admin-forms.md @@ -9,11 +9,12 @@ weight: 4 One of the most common tasks for the PrestaShop developers is to alter the data and make it manageable for customers. In PrestaShop 1.6, a specific Form framework was created to help developers. In PrestaShop 1.7, the system has changed as we now rely on the Symfony Form component. -{{% notice warning %}} +{{% notice info %}} **This system only works with pages from the "Configure" section of your back office.** -If you want to customize an entity form, you're looking for Grid and identifiable object form hooks usage example. +If you want to customize an entity form, you're looking for [Grid]({{}}) and [Identifiable Objects]({{}}). +Learn how to achieve this with the [Grid and identifiable object form hooks usage example]({{}}). {{% /notice %}} Let's see an example on how to add, populate, validate and persist a new form field in PrestaShop 1.7.