title: 'Job Application'
description: 'A job application webform template.'
elements: |
  information:
    '#title': 'Your Information'
    '#type': webform_section
    first_name:
      '#title': 'First Name'
      '#type': textfield
      '#required': true
    last_name:
      '#title': 'Last Name'
      '#type': textfield
      '#required': true
    sex:
      '#type': webform_radios_other
      '#title': Sex
      '#options': sex
      '#required': true
  contact_information:
    '#title': 'Contact Information'
    '#type': webform_section
    contact:
      '#type': webform_contact
      '#title': Contact
      '#title_display': invisible
      '#name__access': false
      '#company__access': false
  resume:
    '#title': 'Your Resume'
    '#type': webform_section
    resume_method:
      '#type': radios
      '#title': 'Resume method'
      '#title_display': invisible
      '#options':
        attach: 'Attach resume file'
        paste: 'Paste your resume'
      '#default_value': attach
      '#wrapper_attributes':
        class:
          - container-inline
    resume_file:
      '#type': managed_file
      '#title': Resume
      '#title_display': invisible
      '#states':
        visible:
          ':input[name="resume_method"]':
            value: attach
        required:
          ':input[name="resume_method"]':
            value: attach
        enabled:
          ':input[name="resume_method"]':
            value: attach
    resume_text:
      '#type': textarea
      '#title': Resume
      '#title_display': invisible
      '#states':
        visible:
          ':input[name="resume_method"]':
            value: paste
        required:
          ':input[name="resume_method"]':
            value: paste
        enabled:
          ':input[name="resume_method"]':
            value: paste
  actions:
    '#type': webform_actions
    '#title': 'Submit button(s)'
    '#submit__label': Apply
settings:
  confirmation_message: 'Thank you for applying.'
handlers:
  email_notification:
    label: 'Email Notification'
    settings:
      from_name: '[webform_submission:values:first_name] [webform_submission:values:last_name]'
      subject: _default
      body: _default
