You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Concept

Introduce the ability to supply logical expressions which can use the values of other fields in order to determine the state on a field.

Expressions might be javascript, or some other expression language.

Maybe expressions are indicated by parenthesis.

( isWizard & ( hasSpellSlots | hasWand))

Features

Dynamically Enabled

The enabled property can take a logical expression as well as a simple boolean value.

fields:
	isBarbarian:
		fieldType: checkbox
		type: Boolean
	isElf
		fieldType: checkbox
		type: Boolean
    barbarianElfHatType:
		fieldType: text
		enabled: ( isBarbarian & isElf )

Dynamically Present

A field is only present on a form, that is - visible and also being stored to the persistance layer - if the "present" expression evaluates to true.

fields:
	barbarianElfHatType:
		fieldType: text
		present: ( isBarbarian & isElf )

Dynamically Validated

Expand the regexp validator to be able to operate not just on the current field, but to include values from other fields.

Introduce a new "expression" validator which can take a logical expression, and which can include values from other fields.

By placing at the field level, devs would have control of where validation messages and hilights appear.

fields:
	clericSpells:
		fieldType: text
		validators:
            onlyClericOrWizard
              class: info....ExpressionValidator
              expression: (!(clericSpells!="" & wizardSpells!=""))
			  errorMessage: Only Cleric OR Wizard spells allowed, not both.


Dynamic Options




Notes

Take a look at linked tickets on:  MGNLUI-2542 - Getting issue details... STATUS


It would be useful to have a Super-link field where I have a first select box to choose a workspace "tours, pages, contacts", and then a link field below it that lets me choose an item from that workspace.


From:  Dynamic forms and cross-field validation

  • populating select options based on the value of another field
  • validating a field depending on the value of another field (including within a composite field itself)
  • enabling/disabling fields conditionally
  • updating form buttons (enabling/disabling/relabeling)


Filtered Multi Select Choose Dialog


It would be good to ask a support representative:

Maybe Rich or Mercedes.



  • No labels