HTML View Helper: Select ignores options with numeric zero value #31

Closed
opened 2014-06-10 23:22:47 +00:00 by jamie · 2 comments
jamie commented 2014-06-10 23:22:47 +00:00 (Migrated from git.hazaar.io)

In the case of the following options array:

$options = array(
    0 => 'Placeholder',
    1 => 'Option 1',
    2 => 'Option 2'
);

The 0 value with label 'Placeholder' will be ignored and the generated HTML will be as such:

<select>
    <option value="Placeholder">Placeholder</option>
    <option value="1">Option 1</option>
    <option value="2">Option 2</option>
</select>
In the case of the following options array: ```php $options = array( 0 => 'Placeholder', 1 => 'Option 1', 2 => 'Option 2' ); ``` The 0 value with label 'Placeholder' will be ignored and the generated HTML will be as such: ```html <select> <option value="Placeholder">Placeholder</option> <option value="1">Option 1</option> <option value="2">Option 2</option> </select> ```
jamie commented 2014-06-10 23:27:24 +00:00 (Migrated from git.hazaar.io)

Status changed to closed by commit 34f43a

Status changed to closed by commit 34f43a
jamie commented 2015-12-03 02:27:11 +00:00 (Migrated from git.hazaar.io)

mentioned in commit 34f43abd57

mentioned in commit 34f43abd57eb1fd3a403f3bc884ee7ed108f7c43
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hazaar/hazaar-mvc-old#31
No description provided.