cheched radio from SMARTY not from PHP
| From: | debian - detectomania | Date: | Thu, 02 Oct 2003 12:25:31 +0000 |
| Subject: | cheched radio from SMARTY not from PHP | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-10286@lists.php.net to get a copy of this message | ||
Hello, I need build a table to administer the user permision to get admin
zone access privileges. the rows look like this:
<------- SMARTY ------->
<td> {$userlist[data].usuario} </td>
<td >{html_radios name="vuserlevel" radios=$userlevels
checked=$userlist[data].idusuario separator=" "}Modificar / Borrar</td>
<------- SMARTY ------->
And assign the variable to smarty.
<--- PHP -- >
$level = array(
1 => "Usuario",
1025 => "Administrador"
);
$UserList has this values:
[0] => Array
(
[0] => 1
[idusuario] => 1
[1] => hell
[usuario] => hell
[2] => 1025
[seclevel] => 1025
)
$display->assign("userlist",$UserList[0]);
$display->assign("userlevels",$level);
<--- PHP -- >
It works good, but I can´t and I don´t know how to check the right radio
from SMARTY for each row while smarty render the table, allways before I
have made that with a single assignement and allways from PHP.
Thank you very much for your feedbacks.
Ricardo Bruzos