|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Svyat333 Smarty n00b
Joined: 01 Apr 2009 Posts: 1
|
Posted: Wed Apr 01, 2009 9:56 am Post subject: Fix problem with html_select_date all_empty(etc) |
|
|
Hi. Here problem:
if i receive $_GET['uid'] i assign value
$smarty->assign('user',$user->get_id($_GET['id']));
in template i write
{html_select_date prefix='bd' all_empty='---=---' time=$user.birthdate field_order='DMY' end_year="-18" start_year="-70"}
But if array user not assigned i receive selected option with current date. Not empty!
To correct this i modify funciton.html_select_date.php file
found string 'selected'=>(int)$time[1]?....
and replace with
(!is_null($params['time']) && (int)$time[1])?...
also modify for day and year select.
So now if i not assign value for time i receive select with default empty values |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|