<select id='field-attribute' name='attribute' class='chosen-select' data-placeholder='Select Attributes' style='width:300px'>
<option value=''></option>
<option value='1' >Red</option>
<option value='2' >Yellow</option>
<option value='3' >10 Units</option>
<option value='4' >20 Units</option>
</select>
I am getting an output as listed above. as Expected
Question
m_attributes table contains a column named 'type'
I wanted the data in column type during option is populated as class='type'
<select id='field-attribute' name='attribute' class='chosen-select' data-placeholder='Select Attributes' style='width:300px'>
<option value=''></option>
<option class='Color' value='1' >Red</option>
<option class='Color' value='2' >Yellow</option>
<option class='Dropdown' value='3' >10 Units</option>
<option class='Dropdown' value='4' >20 Units</option>
</select>
So based on the selected option class attribute, I need to hide 2 textbox below in the page