![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
11/10/2009, 09:54
|
![Avatar de NUCKLEAR](http://static.forosdelweb.com/customavatars/avatar120025_22.gif) | Moderador radioactivo | | Fecha de Ingreso: octubre-2005 Ubicación: Cordoba-Argentina
Mensajes: 5.688
Antigüedad: 19 años, 3 meses Puntos: 890 | |
Respuesta: PHP en valor por defecto en CCK El valor por Default value en el select list debes enviarlo en un arreglo:
$horaactual=Date(H);
If ($horaactual>=7 and $horaactual<15){
return array( 0 => array('value' => Mañana));
}
If ($horaactual>=15 and $horaactual<23){
return array( 0 => array('value' => Tarde));
}
If ($horaactual>=23 or $horaactual<7){
return array( 0 => array('value' => Noche));
}
Recuerda que tienes que tener tambien en tu "Allowed values list:"
La lista
Mañana
Tarde
Noche |