
renderingOptions:
  submitButtonLabel: Submit
type: Form
identifier: conditionalForm
label: 'Conditional Form'
prototypeName: standard
finishers:
  -
    options:
      subject: 'New Conditional Form E-Mail'
      recipients:
        n.poggenburg@leuchtfeuer.com: 'Nico Poggenburg'
      senderAddress: sender@mail.com
      senderName: 'Mail E-Mail Service'
      addHtmlPart: true
      attachUploads: false
      translation:
        language: ''
      useFluidEmail: false
      title: ''
    identifier: EmailToReceiver
  -
    options:
      message: 'Thank you for submitting the form. :)'
      contentElementUid: ''
    identifier: Confirmation
variants:
  -
    identifier: variant-2
    condition: 'formValues["singleselect-2"] == "grumpy"'
    finishers:
      -
        identifier: EmailToReceiver
        options:
          subject: 'New Conditional Form E-Mail to a grumpy person'
          recipients:
            n.poggenburg+grumpy@leuchtfeuer.com: 'Nico Poggenburg'
          senderAddress: sender@mail.com
          senderName: 'Mail E-Mail Service'
          addHtmlPart: true
          attachUploads: false
          translation:
            language: ''
          useFluidEmail: false
          title: ''
  -
    identifier: variant-3
    condition: 'formValues["singleselect-2"] == "nice"'
    finishers:
      -
        identifier: EmailToReceiver
        options:
          subject: 'New Conditional Form E-Mail to a nice person'
          recipients:
            n.poggenburg+nice@leuchtfeuer.com: 'Nico Poggenburg'
          senderAddress: sender@mail.com
          senderName: 'Mail E-Mail Service'
          addHtmlPart: true
          attachUploads: false
          translation:
            language: ''
          useFluidEmail: false
          title: ''
renderables:
  -
    renderingOptions:
      previousButtonLabel: 'Previous step'
      nextButtonLabel: 'Next step'
    type: Page
    identifier: page-1
    label: 'Condition Step'
    renderables:
      -
        properties:
          options:
            blue: 'The Blue one'
            red: 'The Red one'
          fluidAdditionalAttributes:
            required: required
        type: SingleSelect
        identifier: singleselect-1
        label: 'What Pill do you want to take?'
        validators:
          -
            identifier: NotEmpty
  -
    renderingOptions:
      previousButtonLabel: 'Previous step'
      nextButtonLabel: 'Next step'
    type: Page
    identifier: page-2
    label: 'Result Step'
    renderables:
      -
        properties:
          text: 'This text is visible, because you of your decisions. You owe me 100€ ;) Think about your decisions before acting. (you can go back and change your decision)'
        type: StaticText
        identifier: statictext-1
        label: 'You have choosen the red pill'
        renderingOptions:
          enabled: false
        variants:
          -
            identifier: variant-1
            condition: 'formValues["singleselect-1"] == "red"'
            renderingOptions:
              enabled: true
      -
        properties:
          text: 'This text is visible, because you of your decisions. You owe me 100€ ;) Think about your decisions before acting. (you can go back and change your decision)'
        type: StaticText
        identifier: statictext-2
        label: 'You have choosen the blue pill'
        renderingOptions:
          enabled: false
        variants:
          -
            identifier: variant-1
            condition: 'formValues["singleselect-1"] == "blue"'
            renderingOptions:
              enabled: true
      -
        properties:
          options:
            nice: 'A nice Person'
            grumpy: 'A grumpy Person'
          fluidAdditionalAttributes:
            required: required
        type: SingleSelect
        identifier: singleselect-2
        label: 'Who should get your mail?'
        validators:
          -
            identifier: NotEmpty

