Mariana Hernandez Mariana Hernandez - 1 year ago 269
CSS Question

select2 placeholder showing empty option

too add a placeholder in select2 i have to add an empty option tag in the code like this

<select id="e2" name="rol_id" >
{foreach from=$data.roles item=rol}
<option value={$rol.rol_id}>{$rol.rol_nombre}</option>

but when i do that i get this option empty that is selectable
enter image description here

how can i not show that option but still the placeholder?


Max Max
Answer Source

You have a syntax error on 2nd line.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download