dox Executable Documentation

Select field

Show options

Given the select field 'test' with the options array('one' => 'Uno', 'two' => 'Dos')
When I render the field
Then the output should be ' <label for="test">Test</label> <select id="test" class="form-control" name="args[test]"> <option value="one">Uno</option> <option value="two">Dos</option> </select>'

Select value

Given the select field 'test' with the options array('one' => 'Uno', 'two' => 'Dos')
Given the value is 'two'
When I render the field
Then the output should be ' <label for="test">Test</label> <select id="test" class="form-control" name="args[test]"> <option value="one">Uno</option> <option selected value="two">Dos</option> </select>'