You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extend-existing-content-type/step-3-extend-forms.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
# Step 3: Extend forms
2
2
3
-
In this step, you will customize the Banner form (`pagebuilder_banner_form.xml`) by adding a form field for entering a `max-height` value for the `collage-left` and `collage-right` appearances.
3
+
In this step, you will customize the Banner form (`pagebuilder_banner_form.xml`) by adding a form field for entering a `max-height` value for the `collage-left` and `collage-right` appearances.
4
4
5
5
## Create the appearance form
6
6
7
7
Page Builder forms are UI component forms. This means they follow the same conventions as any other UI component form in Magento. If you are not already familiar with UI component forms, you can learn more about them from the [UI Components Guide](https://devdocs.magento.com/guides/v2.3/ui_comp_guide/concepts/ui_comp_xmldeclaration_concept.html). For this tutorial, we provide you with the basic markup for setting up an empty form.
8
8
9
-
Your file structure for the Banner extension form and corresponding layout should look like this:
9
+
Your file structure for the Banner extension form and corresponding layout should look like this:
10
10
11
11
{:width="544px" height="auto"}
12
12
13
13
### Extension form
14
14
15
-
When customizing an existing form, make sure you name your form with the same name as the existing content type's form. In our case, we are customizing the Banner's form, which means we must name our form: `page-banner-form.xml`. Here's the basic XML configuration for the Banner form extension:
15
+
When customizing an existing form, make sure you name your form with the same name as the existing content type's form. In our case, we are customizing the Banner's form, which means we must name our form: `pagebuilder-banner-form.xml`. Here's the basic XML configuration for the Banner form extension:
16
16
17
17
```xml
18
18
<?xml version="1.0" encoding="UTF-8"?>
@@ -45,17 +45,17 @@ When customizing an existing form, make sure you name your form with the same na
45
45
</settings>
46
46
</dataProvider>
47
47
</dataSource>
48
-
48
+
49
49
<!--Add Fieldsets and fields-->
50
-
50
+
51
51
</form>
52
52
```
53
53
54
54
## Add fieldsets and fields
55
55
56
56
Before you add a field to the form of an existing content type, you need to know where to add it. In other words, you need to decide which fieldset to put your field in. We want to put our new `max_height` field below the Banner's existing `min_height` field, which is in the the `appearance_fieldset`.
57
57
58
-
The markup for adding the field to the fieldset looks like this:
58
+
The markup for adding the field to the fieldset looks like this:
0 commit comments