Hello!!
I have a little question. I need to include inside a container "multiplier" a custom code but in doing so, it destroys the design. The code I need to include is:
The code works perfectly, is based on this POST
Trying to place the custom code destroys the layout of the form. Can I do it any other way?
Thanks for the help!! Cordially
Javierp.
I have a little question. I need to include inside a container "multiplier" a custom code but in doing so, it destroys the design. The code I need to include is:
<?php
$db =& JFactory::getDBO();
$count = $db->loadResult();
$query = "
SELECT DISTINCT `cd_servicio`, `cd_idioma_origen`, `cd_idioma_destino`
FROM `j4tyn_z_tservicios_real` ORDER BY `cd_idioma_origen`;
";
$db->setQuery($query);
$data = $db->loadObjectList();
?>
<div class="form-group gcore-form-row" id="form-row-cd_servicio1"><label for="cd_servicio1" class="control-label gcore-label-left">Servicio</label>
<div class="gcore-input gcore-display-table" id="fin-cd_servicio1"><select name="Data[__N__][cd_servicio]" id="cd_servicio__N__" size="0" class="form-control A" title="" style="" data-load-state="" data-tooltip="">
<option value="">-- Seleccionar un Servicio --</option>
<?php
$optgroup = '';
foreach ( $data as $d ) {
$selected = '';
if ( $d->id == cd_servicio ) {
$selected = "selected='selected'";
}
if ( $d->cd_idioma_origen != $optgroup ) {
if ( $optgroup ) {
echo "</optgroup>";
}
echo "<optgroup label='{$d->cd_idioma_origen}'>";
$optgroup = $d->cd_idioma_origen;
}
echo "<option value='{$d->cd_servicio}' $selected >{$d->cd_idioma_destino} - Cod: {$d->cd_servicio}</option>";
}
echo "</optgroup>";
?>
</select>
</div></div>
The code works perfectly, is based on this POST
Trying to place the custom code destroys the layout of the form. Can I do it any other way?
Thanks for the help!! Cordially
Javierp.