Condition BlockΒΆ

Define several conditions to change the behavior of the form depending on user input.
These conditions can be used to do different validation depending on what the user entered or selected before.

TypoScript Path

plugin.tx_formhandler_form.settings.predefinedForms.[x].conditionBlocks

Example Code:

plugin.tx_formhandler_form.settings.predefinedForms.devExample {
  conditionBlocks {
    1 {
      conditions.OR1.AND1 = 1.customer.country=NONE
      isTrue {
        disableErrorCheckFields = 1.customer.city,1.customer.postalCode,1.customer.streetAddress,
      }
    }
    2 {
      conditions.OR1 {
        AND1 = 1.customer.payment=credit-card
      }
      isTrue {
        disableErrorCheckFields = 2.payment.bank,2.payment.IBAN,2.payment.accountHolder
      }
      else {
         # Do something if the condition was not true. This will not be needed often.
      }
    }
  }
}

Properties

conditions

The conditions for a given condition block.

Mandatory

True

Data Type

Array<String, Array<String, String>>

isTrue

A list of disableErrorCheckFields for when the conditions are met.

Mandatory

True

Data Type

Array<String, String>

else

A list of disableErrorCheckFields for when the conditions are not met.

Mandatory

False

Data Type

Array<String, String>