Rex Rex
Rex Rex

Reputation: 1030

Android web view and html multiselect dropdown

I have html page with multiselect drop down

HTML Code.

<select multiselect>

<option>0 months</option>
<option>12 months</option>
<option>13 monhts</option>
<option>14 months</option>

</select>

This is showed in android web view

This shows first option(0 months) in label,But i want to show 'Select age' as label .

I tried disabled attribute in 1st option

<option disabled>Select age</option>
<option>12 months</option>
<option>13 monhts</option>

,but this does not shows in label

Thanx in advance

Upvotes: 1

Views: 1231

Answers (2)

IVAN BOLTYSHEV
IVAN BOLTYSHEV

Reputation: 1

<select multiselect>
    <optgroup label="Select Age"></optgroup>
    <option>0 months</option>
    <option>12 months</option>
    <option>13 monhts</option>
    <option>14 months</option>
</select>

Upvotes: 0

Pierre Rust
Pierre Rust

Reputation: 2504

This should do the trick :

<select multiselect>
<option disabled="disabled" selected="selected" hidden="hidden">Select Age</option>
<option>0 months</option>
<option>12 months</option>
<option>13 monhts</option>
<option>14 months</option>

</select>

Upvotes: 1

Related Questions