@@ -121,8 +121,8 @@ public function it_queries_the_fields()
121
121
'invalid ' => 'This isnt in the fieldtypes config fields so it shouldnt be output ' ,
122
122
'width ' => 50 ,
123
123
],
124
- 'subject ' => ['type ' => 'select ' , 'options ' => ['disco ' => 'Disco ' , 'house ' => 'House ' ]],
125
- 'message ' => ['type ' => 'textarea ' , 'width ' => 33 ],
124
+ 'subject ' => ['type ' => 'select ' , 'options ' => ['disco ' => 'Disco ' , 'house ' => 'House ' ], ' if ' => [ ' name ' => ' not empty ' ] ],
125
+ 'message ' => ['type ' => 'textarea ' , 'width ' => 33 , ' unless ' => [ ' subject ' => ' equals spam ' ] ],
126
126
]);
127
127
128
128
BlueprintRepository::shouldReceive ('find ' )->with ('forms.contact ' )->andReturn ($ blueprint );
@@ -137,6 +137,8 @@ public function it_queries_the_fields()
137
137
instructions
138
138
width
139
139
config
140
+ if
141
+ unless
140
142
}
141
143
}
142
144
}
@@ -158,6 +160,8 @@ public function it_queries_the_fields()
158
160
'config ' => [
159
161
'placeholder ' => 'Type here... ' ,
160
162
],
163
+ 'if ' => null ,
164
+ 'unless ' => null ,
161
165
],
162
166
[
163
167
'handle ' => 'subject ' ,
@@ -168,6 +172,8 @@ public function it_queries_the_fields()
168
172
'config ' => [
169
173
'options ' => ['disco ' => 'Disco ' , 'house ' => 'House ' ],
170
174
],
175
+ 'if ' => ['name ' => 'not empty ' ],
176
+ 'unless ' => null ,
171
177
],
172
178
[
173
179
'handle ' => 'message ' ,
@@ -176,6 +182,8 @@ public function it_queries_the_fields()
176
182
'instructions ' => null ,
177
183
'width ' => 33 ,
178
184
'config ' => [],
185
+ 'if ' => null ,
186
+ 'unless ' => ['subject ' => 'equals spam ' ],
179
187
],
180
188
],
181
189
],
0 commit comments