Cita:
Iniciado por Triby
Si estás usando Smarty, no deberías crear el HTML del select, sino establecer las opciones:
Código PHP:
Ver original<?php
$smarty->assign('myOptions', array( 1800 => 'Joe Schmoe',
9904 => 'Jack Smith',
2003 => 'Charlie Brown')
);
$smarty->assign('mySelect', 9904);
?>
Información tomada de:
https://www.smarty.net/docsv2/en/lan...ml.options.tpl Para mi caso hice un cambio:
Código PHP:
$smarty->assign('cust_ids', array(56,92,13));
$smarty->assign('cust_names', array(
'Joe Schmoe',
'Jane Johnson',
'Charlie Brown'));
Es la única forma de enviar un valor
selected al
Select del html