@@ -121,8 +121,8 @@ public function it_queries_the_fields()
121121 'invalid ' => 'This isnt in the fieldtypes config fields so it shouldnt be output ' ,
122122 'width ' => 50 ,
123123 ],
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 ' ] ],
126126 ]);
127127
128128 BlueprintRepository::shouldReceive ('find ' )->with ('forms.contact ' )->andReturn ($ blueprint );
@@ -137,6 +137,8 @@ public function it_queries_the_fields()
137137 instructions
138138 width
139139 config
140+ if
141+ unless
140142 }
141143 }
142144}
@@ -158,6 +160,8 @@ public function it_queries_the_fields()
158160 'config ' => [
159161 'placeholder ' => 'Type here... ' ,
160162 ],
163+ 'if ' => null ,
164+ 'unless ' => null ,
161165 ],
162166 [
163167 'handle ' => 'subject ' ,
@@ -168,6 +172,8 @@ public function it_queries_the_fields()
168172 'config ' => [
169173 'options ' => ['disco ' => 'Disco ' , 'house ' => 'House ' ],
170174 ],
175+ 'if ' => ['name ' => 'not empty ' ],
176+ 'unless ' => null ,
171177 ],
172178 [
173179 'handle ' => 'message ' ,
@@ -176,6 +182,8 @@ public function it_queries_the_fields()
176182 'instructions ' => null ,
177183 'width ' => 33 ,
178184 'config ' => [],
185+ 'if ' => null ,
186+ 'unless ' => ['subject ' => 'equals spam ' ],
179187 ],
180188 ],
181189 ],
0 commit comments