renderingOptions:
  submitButtonLabel: Submit
identifier: kontaktformular
label: Contact
type: Form
prototypeName: standard
variants:
  - identifier: variant-finisher-mail
    condition: 'siteLanguage("languageId") == "2" ||
                (traverse(formValues, "field-contactreason") != "offer_sales" && traverse(formValues, "field-contactreason") != "products") ||
                (formValues["field-country"] != "CA" && formValues["field-country"] != "SG" && formValues["field-country"] != "TW" && formValues["field-country"] != "AU" && formValues["field-country"] != "GB" && formValues["field-country"] != "BR" && formValues["field-country"] != "SI" &&
                formValues["field-country"] != "DE" &&
                formValues["field-country"] != "FR" &&
                formValues["field-country"] != "ES" &&
                formValues["field-country"] != "IT" &&
                formValues["field-country"] != "JP" &&
                formValues["field-country"] != "KR" &&
                formValues["field-country"] != "CH" &&
                formValues["field-country"] != "IN" &&
                formValues["field-country"] != "SI" &&
                formValues["field-country"] != "FI" &&
                formValues["field-country"] != "US" &&
                formValues["field-country"] != "AT" &&
                formValues["field-country"] != "RU" &&
                formValues["field-country"] != "SE" &&
                formValues["field-country"] != "DK" &&
                formValues["field-country"] != "TR" &&
                formValues["field-country"] != "NL")'
    finishers:
      - options:
          subject: 'Customer inquiry from hawe.com'
          recipients:
            info@hawe.de: ''
          senderAddress: customer-inquiry@hawe.com
          replyToAddress: '{field-email}'
          addHtmlPart: true
          useFluidEmail: true
          translation:
            language: ''
        identifier: EmailToReceiver
      - options:
          pageUid: '2734'
          additionalParameters: ''
        identifier: Redirect
  - identifier: variant-finisher-salesforce
    condition: 'siteLanguage("languageId") != "2" &&
                (traverse(formValues, "field-contactreason") == "offer_sales" || traverse(formValues, "field-contactreason") == "products") &&
                (formValues["field-country"] == "CA" || formValues["field-country"] == "SG" || formValues["field-country"] == "TW" || formValues["field-country"] == "AU" || formValues["field-country"] == "GB" || formValues["field-country"] == "BR" || formValues["field-country"] == "SI" ||
                formValues["field-country"] == "DE" ||
                formValues["field-country"] == "FR" ||
                formValues["field-country"] == "ES" ||
                formValues["field-country"] == "IT" ||
                formValues["field-country"] == "JP" ||
                formValues["field-country"] == "KR" ||
                formValues["field-country"] == "CH" ||
                formValues["field-country"] == "IN" ||
                formValues["field-country"] == "SI" ||
                formValues["field-country"] == "FI" ||
                formValues["field-country"] == "US" ||
                formValues["field-country"] == "AT" ||
                formValues["field-country"] == "RU" ||
                formValues["field-country"] == "SE" ||
                formValues["field-country"] == "DK" ||
                formValues["field-country"] == "TR" ||
                formValues["field-country"] == "NL")'
    finishers:
      - options:
          organizationId: 00D0N000000jdBq
          sourceLead: Web2Lead
          returnUrl: 'https://www.hawe.com'
          backupMailSubject: 'Customer inquiry from hawe.com'
          backupMailRecipientAddress: 'customer-inquiry@hawe.com'
          backupMailSenderAddress: 'customer-inquiry@hawe.com'
        identifier: Salesforce
      - options:
          pageUid: '2734'
          additionalParameters: ''
        identifier: Redirect
renderables:
  - renderingOptions:
      previousButtonLabel: ''
      nextButtonLabel: Submit
    identifier: page-1
    label: ''
    type: Page
    renderables:
      - type: Fieldset
        identifier: fieldset-1
        label: ''
        renderables:
          - properties:
              options:
                offer_sales: 'Offer / Sales'
                products: Products
                service: Service
                training: Training
                other: Other
              prependOptionLabel: 'Contact Reason'
              elementSalesforceKey: 00N0N00000GYsmO
            type: SingleSelect
            identifier: field-contactreason
            label: 'Contact Reason'
            variants:
              - identifier: variant-contactreason
                condition: 'siteLanguage("languageId") == 2'
                renderingOptions:
                  enabled: false
            validators:
              - identifier: NotEmpty
      - type: Fieldset
        identifier: fieldset-2
        label: ''
        renderables:
          - properties:
              options:
                mr: Mr
                mrs: Mrs
              prependOptionLabel: 'Title'
              elementSalesforceKey: salutation
            type: SingleSelect
            identifier: field-title
            label: Title
      - type: Fieldset
        identifier: fieldset-3
        label: ''
        renderables:
          - type: GridRow
            identifier: gridrow-1
            label: 'Grid: Row'
            renderables:
              - defaultValue: ''
                identifier: field-firstname
                label: 'First name'
                type: Text
                properties:
                  fluidAdditionalAttributes:
                    placeholder: 'First name'
                  elementSalesforceKey: first_name
                validators:
                  - identifier: NotEmpty
              - defaultValue: ''
                type: Text
                identifier: field-lastname
                label: 'Last name'
                properties:
                  fluidAdditionalAttributes:
                    placeholder: 'Last name'
                  elementSalesforceKey: last_name
                validators:
                  - identifier: NotEmpty
          - type: GridRow
            identifier: gridrow-2
            label: 'Grid: Row'
            renderables:
              - defaultValue: ''
                type: Email
                identifier: field-email
                label: E-mail
                properties:
                  fluidAdditionalAttributes:
                    placeholder: 'E-mail'
                  elementSalesforceKey: email
                validators:
                  - identifier: EmailAddress
                  - identifier: NotEmpty
              - defaultValue: ''
                type: Text
                identifier: field-telephone
                label: Telephone
                properties:
                  fluidAdditionalAttributes:
                    placeholder: Telephone
                  elementSalesforceKey: phone
          - type: GridRow
            identifier: gridrow-3
            label: 'Grid: Row'
            renderables:
              - defaultValue: ''
                type: Text
                identifier: field-fax
                label: Fax
                properties:
                  fluidAdditionalAttributes:
                    placeholder: Fax
                  elementSalesforceKey: fax
              - defaultValue: ''
                type: Text
                identifier: field-company
                label: Company
                properties:
                  fluidAdditionalAttributes:
                    placeholder: 'Company'
                  elementSalesforceKey: company
                validators:
                  - identifier: NotEmpty
          - defaultValue: ''
            type: Text
            identifier: field-street
            label: Street
            properties:
              fluidAdditionalAttributes:
                placeholder: Street
              elementSalesforceKey: street
      - type: Fieldset
        identifier: fieldset-4
        label: ''
        renderables:
          - type: GridRow
            identifier: gridrow-4
            label: 'Grid: Row'
            renderables:
              - defaultValue: ''
                type: Text
                identifier: field-postcode
                label: 'Post code'
                properties:
                  fluidAdditionalAttributes:
                    placeholder: 'Post code'
                  elementSalesforceKey: zip
              - defaultValue: ''
                type: Text
                identifier: field-towncity
                label: Town/city
                properties:
                  fluidAdditionalAttributes:
                    placeholder: Town/city
                  elementSalesforceKey: city
          - type: GridRow
            identifier: gridrow-5
            label: 'Grid: Row'
            renderables:
              - properties:
                  prependOptionLabel: 'Country'
                  valueField: cn_iso_2
                  labelField: 'cn_short_{currentLanguage}'
                  elementSalesforceKey: country_code
                type: SingleSelectWithCountries
                identifier: field-country
                label: Country
                defaultValue: DE
                variants:
                  - identifier: variant-country
                    condition: 'siteLanguage("languageId") == 0 || siteLanguage("languageId") == 2'
                    validators:
                      - identifier: NotEmpty
              - defaultValue: ''
                type: Text
                identifier: field-state-input
                label: State
                properties:
                  fluidAdditionalAttributes:
                    placeholder: State
                  elementSalesforceKey: state_code
                renderingOptions:
                  enabled: false
                variants:
                  - identifier: variant-state-input
                    condition: 'siteLanguage("languageId") == 0 || siteLanguage("languageId") == 2'
                    renderingOptions:
                      enabled: true
              - properties:
                  elementSalesforceKey: state_code
                  prependOptionLabel: 'State'
                  elementTypoScriptPath: lib.nefb.regionsAu
                  fluidAdditionalAttributes:
                    data-additional: AU
                type: SingleSelectTypoScript
                identifier: field-state-select-au
                label: State
                renderingOptions:
                  enabled: false
                variants:
                  - identifier: variant-state-select-au
                    condition: 'siteLanguage("languageId") == 0'
                    renderingOptions:
                      enabled: true
              - properties:
                  elementSalesforceKey: state_code
                  prependOptionLabel: 'State'
                  elementTypoScriptPath: lib.nefb.regionsCa
                  fluidAdditionalAttributes:
                    data-additional: CA
                type: SingleSelectTypoScript
                identifier: field-state-select-ca
                label: State
                renderingOptions:
                  enabled: false
                variants:
                  - identifier: variant-state-select-ca
                    condition: 'siteLanguage("languageId") == 0'
                    renderingOptions:
                      enabled: true
              - properties:
                  elementSalesforceKey: state_code
                  prependOptionLabel: 'State'
                  elementTypoScriptPath: lib.nefb.regions
                type: SingleSelectTypoScript
                identifier: field-state-select
                label: State
                renderingOptions:
                  enabled: false
                variants:
                  - identifier: variant-state-select
                    condition: 'siteLanguage("languageId") != 0 && siteLanguage("languageId") != 2'
                    renderingOptions:
                      enabled: true
      - type: Fieldset
        identifier: fieldset-5
        label: ''
        renderables:
          - defaultValue: ''
            type: Textarea
            identifier: field-message
            label: 'Your message to us'
            properties:
              containerClassAttribute: grid__unit--full
              fluidAdditionalAttributes:
                placeholder: 'Your message to us'
              elementSalesforceKey: description
          - properties:
              text: '<a href="t3://page?uid=60" target="_blank">You can find further information in our privacy statement.</a>'
            type: StaticText
            identifier: text-privacy
            label: ''
      - properties:
          text: '* All marked fields must be completed.'
        type: StaticText
        identifier: text-mandatory
        label: ''
