I am using bootstrap-select from http://silviomoreto.github.io/bootstrap-select/.
I am using the code in Prestashop as country selector as follows;
{elseif $field_name eq "country" || $field_name eq "Country:name"}
<p class="required select">
<div class="form-group"><label for="id_country" class="col-lg-2 col-md-2 col-sm-2 control-label">{l s='Country'} <sup>*</sup></label>
<div class="col-lg-10 col-md-10 col-sm-10"><select name="id_country" id="id_country" class="selectpicker">
{foreach from=$countries item=v}
<option value="{$v.id_country}"{if (isset($guestInformations) AND $guestInformations.id_country == $v.id_country) OR (!isset($guestInformations) && $sl_country == $v.id_country)} selected="selected"{/if}>{$v.name|escape:'htmlall':'UTF-8'}</option>
{/foreach}
</select></div></div>
</p>
This is the original.
{elseif $field_name eq "country" || $field_name eq "Country:name"}
<p class="required select">
<label for="id_country">{l s='Country'} <sup>*</sup></label>
<select name="id_country" id="id_country">
{foreach from=$countries item=v}
<option value="{$v.id_country}"{if (isset($guestInformations) AND $guestInformations.id_country == $v.id_country) OR (!isset($guestInformations) && $sl_country == $v.id_country)} selected="selected"{/if}>{$v.name|escape:'htmlall':'UTF-8'}</option>
{/foreach}
</select>
</p>
I am trying to figure out why Bootstrap select is giving me an error..maybe the option value isn't being passed on? Anyone used Bootstrap select and had a similar problem? It has been working for everything else for me.
Thanks in advance! Carl