Dynamic forms in Briefing system

Prev Next

Product item added to briefing is a combinations of fields from three main modules: Product, Product on Briefing and Prices. For the last two modules dynamic forms are configured in the same way as it was previously described, but for Product module there are some differences.

The following needs to be taken into account when configuring dynamic forms in briefing system for the module, mapped as “Product” module in Briefing settings (applicable to “Add/Edit product” window):

  • Fields from Product module are shown inside product sheet tabs and each tab has its own field template assigned. So, in this case three field templates: Base template, Product Sheet tab template and Dynamic templates must be properly chained.

  • “Base Template” overrides the Product Sheet tab templates from Product module (can only hide fields available by product sheet tab template but not show additional fields).

  • To make the field that is supposed to be controlled by dynamic templates it is necessary to use the Base Template with the field in question hidden and Product Sheet template with this field visible.

Consider the following as an example of correct configuration of dynamic forms for the “Add/Edit product” window in briefing system. 

Given:

  • A Product module that keeps product items that can be added to briefing in two countries Denmark and Norway.

  • Two product sheet tabs are expected to be used to show relevant fields for different countries.

  • Fields present in the product item:

Field Name

Field Content

Field Type

Values

Note

Product Number

Text

Text

 

Base field

Country

Module link

Selectbox

  • Denmark

  • Norway

Base field

Text for Denmark

Text

Text

 

Related to Denmark product sheet tab

Text for Norway

Text

Text

 

Related to Norway product sheet tab

Needed:

  • When adding/editing a product on briefing user should see only the fields, that are relevant to the chosen country respecting the product sheet tab selected at the moment.

  • Additional field will appear when selecting a value in “Country” selectbox.

  • Additional field should not be visible on the non-relevant product sheet tab (i.e. additional field “Text for Denmark” should not be shown on Norway tab, even if Denmark is selected in the “Country” selectbox). 

Configuration steps:

  1. Create field templates in Product module and configure the field visibility for them:

    Module > Field Templates
    image7.pngModule > Field Usage > Templates
    image1.png

  2. Assign Base template in Product > Settings > Field Template for Add/Edit Item.

    image4.png

  3. Assign Denmark template to the Denmark product sheet tab in Briefing System module > Product Sheet Tabs > Denmark.

    image5.png

    Do the same for and Norway template and Norway tab.

  4. Assign Text for Denmark and Text for Norway templates to corresponding module link options in Product > Field definition > Country.

    image3.png

  5. Go to briefing page and try to add new product. Select Denmark in “Country” selectbox.

image6.pngimage2.png

You will see, that additional field “Text for Denmark” appears on the Denmark tab but is still hidden on Norway tab.

Note! To ensure consistent behavior of the dynamic fields functionality in the system, the fields that are not available for editing in regular edit forms by dynamic fields configurations are displayed as read-only in inline edit. This ensures that no modifications of the fields that are not available for editing in the regular “Edit” window can take place.