380
800
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<form class="m-form" action="" method="POST" data-behavior="FormValidator">
    <div class="m-form__field m-form__field--text">
        <label class="m-form-field m-form-field--text " data-behavior="FormField">
            <input class="m-form-field__input" type="text" name="first_name" value="" data-formfield-input required />


            <span class="m-form-field__status"></span>

            <span class="m-form-field__label">
                First Name *
            </span>

            <span class="m-form-field__assistive-label">Required *</span>
        </label>
    </div>
    <div class="m-form__field m-form__field--text">
        <label class="m-form-field m-form-field--text " data-behavior="FormField">
            <input class="m-form-field__input" type="text" name="last_name" value="" data-formfield-input required />


            <span class="m-form-field__status"></span>

            <span class="m-form-field__label">
                Last Name *
            </span>

            <span class="m-form-field__assistive-label">Required *</span>
        </label>
    </div>
    <div class="m-form__field m-form__field--email">
        <label class="m-form-field m-form-field--email " data-behavior="FormField">
            <input class="m-form-field__input" type="email" name="email" value="" data-formfield-input required />


            <span class="m-form-field__status"></span>

            <span class="m-form-field__label">
                Email Address *
            </span>

            <span class="m-form-field__assistive-label">Required *</span>
        </label>
    </div>
    <div class="m-form__field m-form__field--text">
        <label class="m-form-field m-form-field--text " data-behavior="FormField">
            <input class="m-form-field__input" type="text" name="telephone" value="" data-formfield-input />


            <span class="m-form-field__status"></span>

            <span class="m-form-field__label">
                Telephone
            </span>

        </label>
    </div>
    <div class="m-form__field m-form__field--select">
        <label class="m-form-field m-form-field--select " data-behavior="FormField">
            <div class="m-form-field__select ">
                <div class="s-dropdown-standard " data-behavior="Dropdown" data-dropdown-placeholder="" data-dropdown-allow-null="true" data-dropdown-label="Industry *">
                    <select required name="industry" data-dropdown-select data-formfield-input="true">
                        <option value=""></option>
                        <option value="1">One</option>
                        <option value="2">Two</option>
                        <option value="3">Three</option>
                        <option value="4">Four</option>
                    </select>
                </div>
            </div>


            <span class="m-form-field__status"></span>

            <span class="m-form-field__label">
                Industry *
            </span>

            <span class="m-form-field__assistive-label">* Required</span>
        </label>
    </div>
    <div class="m-form__field m-form__field--textarea">
        <label class="m-form-field m-form-field--textarea " data-behavior="FormField">
            <textarea class="m-form-field__textarea" rows="1" data-behavior="ExpandableTextarea" type="textarea" name="comments" data-formfield-input value=""></textarea>


            <span class="m-form-field__status"></span>

            <span class="m-form-field__label">
                Comments
            </span>

        </label>
    </div>
    <div class="m-form__break ">
    </div>
    <div class="m-form__group ">
        <label class="m-form__group-label">When are you considering attending a program? *</label>
        <ul>
            <li class="m-form__group-option">
                <label>
                    <span>
                        <div class="m-bool-input">
                            <input class="m-bool-input__input" type="checkbox" value="1" name="attending[]" />
                            <span class="m-bool-input__status"></span>
                        </div>
                    </span>
                    <span>In the next 0-6 months</span>
                </label>
            </li>
            <li class="m-form__group-option">
                <label>
                    <span>
                        <div class="m-bool-input">
                            <input class="m-bool-input__input" type="checkbox" value="2" name="attending[]" />
                            <span class="m-bool-input__status"></span>
                        </div>
                    </span>
                    <span>In the next 6+ months</span>
                </label>
            </li>
            <li class="m-form__group-option">
                <label>
                    <span>
                        <div class="m-bool-input">
                            <input class="m-bool-input__input" type="checkbox" value="3" name="attending[]" />
                            <span class="m-bool-input__status"></span>
                        </div>
                    </span>
                    <span>Not applicable</span>
                </label>
            </li>
            <li class="m-form__group-option">
                <label>
                    <span>
                        <div class="m-bool-input">
                            <input class="m-bool-input__input" type="checkbox" value="4" name="attending[]" />
                            <span class="m-bool-input__status"></span>
                        </div>
                    </span>
                    <span>Unsure</span>
                </label>
            </li>
        </ul>
    </div>
    <div class="m-form__break ">
    </div>
    <div class="m-form__button ">

        <button class="arrow--md-right a-btn a-btn--primary">
            Send Your Message
            <span class="a-icon  a-btn__icon">
                <svg class="icon--arrow--md-right icon" role="img">
                    <use role="presentation" xlink:href="#icon--arrow--md-right" />
                </svg>
            </span>
        </button>
    </div>
</form>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
{
  "fields": [
    {
      "type": "field",
      "field": {
        "name": "first_name",
        "label": "First Name *",
        "value": "",
        "type": "text",
        "required": true,
        "assistive_label": "Required *"
      }
    },
    {
      "type": "field",
      "field": {
        "name": "last_name",
        "label": "Last Name *",
        "value": "",
        "type": "text",
        "required": true,
        "assistive_label": "Required *"
      }
    },
    {
      "type": "field",
      "field": {
        "name": "email",
        "label": "Email Address *",
        "value": "",
        "type": "email",
        "required": true,
        "assistive_label": "Required *"
      }
    },
    {
      "type": "field",
      "field": {
        "name": "telephone",
        "label": "Telephone",
        "value": "",
        "type": "text"
      }
    },
    {
      "type": "field",
      "field": {
        "name": "industry",
        "label": "Industry *",
        "value": "",
        "required": true,
        "type": "select",
        "assistive_label": "* Required",
        "options": [
          {
            "value": "",
            "label": ""
          },
          {
            "value": "1",
            "label": "One"
          },
          {
            "value": "2",
            "label": "Two"
          },
          {
            "value": "3",
            "label": "Three"
          },
          {
            "value": "4",
            "label": "Four"
          }
        ]
      }
    },
    {
      "type": "field",
      "field": {
        "name": "comments",
        "label": "Comments",
        "value": "",
        "type": "textarea"
      }
    },
    {
      "type": "break"
    },
    {
      "type": "group",
      "group": {
        "label": "When are you considering attending a program? *",
        "options": [
          {
            "type": "checkbox",
            "value": "1",
            "name": "attending[]",
            "label": "In the next 0-6 months"
          },
          {
            "type": "checkbox",
            "value": "2",
            "name": "attending[]",
            "label": "In the next 6+ months"
          },
          {
            "type": "checkbox",
            "value": "3",
            "name": "attending[]",
            "label": "Not applicable"
          },
          {
            "type": "checkbox",
            "value": "4",
            "name": "attending[]",
            "label": "Unsure"
          }
        ]
      }
    },
    {
      "type": "break"
    },
    {
      "type": "button",
      "button": {
        "text": "Send Your Message",
        "style": "primary",
        "icon": "arrow--md-right"
      }
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<form class="m-form" action="{{ action }}" method="{{ method | default("POST") }}" data-behavior="FormValidator">
	{% for field in fields %}
		<div class="m-form__{{ field.type }} {{ field.type == 'field' ? 'm-form__field--' ~ field.field.type }}">
			{% if field.type == 'button' %}
				{% include 'components/atoms/btn/btn' with ({ justified: true })|merge(field.button) only %}
			{% elseif field.type == 'note' %}
				<p>{{ field.note }}</p>
			{% elseif field.type == "field" %}
				{% include 'components/molecules/form-field/form-field' with field.field only %}
			{% elseif field.type == 'group' %}
				{% set group = field.group %}
				<label class="m-form__group-label">{{ group.label }}</label>
				{% if group.options %}
					<ul {% if group.required %} data-formvalidator-required {% endif %}>
						{% for option in group.options %}
							<li class="m-form__group-option">
								<label>
									<span>{% include 'components/molecules/bool-input/bool-input' with option only %}</span>
									<span>{{ option.label }}</span>
								</label>
							</li>
						{% endfor %}
					</ul>
				{% endif %}
			{% endif %}
		</div>
	{% endfor %}
</form>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
.m-form {
  @include child-spacing-y(
    (
      "xsmall": 36px,
      "medium+": 40px,
      "xlarge+": 44px
    )
  );

  &__field--hidden {
    display: none;
  }

  &__note {
    color: var(--color--text--aux);
    @include f-body-4;
    @include spacing(
      (
        "xlarge+": 92px
      )
    );
  }

  &__group-label {
    @include f-ui-4;
    color: var(--color--text--aux);
  }

  &__group-option {
    @include f-ui-1;
    display: block;
    &:first-child {
      padding-top: 24px;
    }
    &:not(:first-child) {
      padding-top: 12px;
    }

    label {
      cursor: pointer;
      display: flex;
      align-items: center;
      @include child-spacing-x(
        (
          xsmall: 12px
        )
      );
    }
  }

  @include breakpoint("xlarge+") {
    @include columns-container;

    @each $name, $point in $breakpoints {
      @include breakpoint("#{$name}") {
        $gutter: map-get($inner-gutters, $name);
        max-width: colspan(6, $name, $gutter);
      }
    }

    &__break {
      flex-basis: 100%;
      height: 0;
      padding-top: 28px !important;
    }

    &__group,
    &__button,
    &__field {
      @include column(
        (
          xlarge: 3,
          xxlarge: 3,
          xxxlarge: 3
        )
      );
    }

    &__note,
    &__field--textarea {
      @include column(
        (
          xlarge: 6,
          xxlarge: 6,
          xxxlarge: 6
        )
      );
    }
  }
}