Skip to main content

DataElement Forms

Each DataElement has a form to create or edit instances.

Disabling or Hiding Fields​

FieldsFieldA property of a DataElement expanded to a database column and user interface input element. can be disabled or hidden in the forms by adding options to the model.

Option
cruds.form.hide Field

Hide this fieldFieldA property of a DataElement expanded to a database column and user interface input element. in all forms

<options>
<cruds.form.hide/>
</options>
Option
cruds.form.hideOnCreate Field

Hide this fieldFieldA property of a DataElement expanded to a database column and user interface input element. on the create form

<options>
<cruds.form.hideOnCreate/>
</options>
Option
cruds.form.hideOnModify Field

Hide this fieldFieldA property of a DataElement expanded to a database column and user interface input element. on the edit form

<options>
<cruds.form.hideOnModify/>
</options>
Option
cruds.form.disable Field

Disable this fieldFieldA property of a DataElement expanded to a database column and user interface input element. in all forms

<options>
<cruds.form.disable/>
</options>
Option
cruds.form.disableOnCreate Field

Disable this fieldFieldA property of a DataElement expanded to a database column and user interface input element. on the create form

<options>
<cruds.form.disableOnCreate/>
</options>
Option
cruds.form.disableOnModify Field

Disable this fieldFieldA property of a DataElement expanded to a database column and user interface input element. on the edit form

<options>
<cruds.form.disableOnModify/>
</options>

Filtered LinkField dropdowns​

Option
isLinkDriver Field

Filters the options of another LinkField based on the value selected in this fieldFieldA property of a DataElement expanded to a database column and user interface input element..

E.g. say we have a Customer and an Address DataElement, where a customer has multiple addresses. If we select a Customer in a form, we want to only be abe to select Addresses linked to that Customer.

The value of the option should correspond to linkTarget: "$targetField$", finder: "$finderForTargetElement$", finderField: "$fieldToUseInFinder$".

  • linkTarget is the name of the fieldFieldA property of a DataElement expanded to a database column and user interface input element. that should be filtered.
  • finder is the finderFinderA search specification combining field-operator pairs to execute standard data queries on a DataElement. that should be used to find the filtered options.
  • finderField is the fieldFieldA property of a DataElement expanded to a database column and user interface input element. in the finderFinderA search specification combining field-operator pairs to execute standard data queries on a DataElement. that contains a reference to the current fieldFieldA property of a DataElement expanded to a database column and user interface input element..
note

The option has another, outdated, way to define the value:

{linkDriverField}_{targetField}.{finderField}_{finder}

Here linkDriverField should be the name of the FieldFieldA property of a DataElement expanded to a database column and user interface input element. with the isLinkDriver option.

<options>
<isLinkDriver>linkTarget: "address", finder: "findByCustomerEq", finderField: "customer"</isLinkDriver>
</options>
<options>
<isLinkDriver>costumer_address_findByCustomerEq</isLinkDriver>
</options>
<options>
<isLinkDriver>customer_address.customerField_findByCustomerEq</isLinkDriver>
</options>