Form Component
Last updated
Last updated
The "Form Component Container" component shows one Form Component inside it. It has no additional UI decorations.
The contained form component can optionally show related data.
It is suited for use in both Advanced (Responsive) and Simple CSS forms.
Form Components are an advanced feature. Please first see other Form Container types to explore options for nesting forms within forms.
Here are the steps for placing a container on the form:
Open the Form Editor of the form where you need to place an Form Component Container
Find FormComponentContainer in Form Containers section in the components' pallet
Drag and drop the FormComponentContainer component in the desired place of the form
Select the containedForm
property, where you set the name of the form component you want to be displayed in the container
Edit the elements of the contained Form Component, when it's necessary
Edit other FormComponentContainer properties if needed
It is recommended to set a specific name
in the Form Component Container properties in order to make it easier to use it later in scripting.
Example: fc_id_name_details
.
Because a Form Component form doesn't have its own logic (.js file), events like onAction
of a button must be assigned to the form.js file of the containing form, or to top-level scopes or entity methods.
Example:
You can add logic for a button created in a Form Component form (placed in a Form Component Container) by accessing that button in the main form and assign the button events to the main form's scope (.js file):
Elements of a Form Component can be accessed in the main form where its Form Component Container is placed, using the following convention:
elements.my_form_component.containedForm.my_sub_element.property
Example: