|
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 |
astroboy Smarty n00b
Joined: 22 Jul 2003 Posts: 4
|
Posted: Wed Jul 30, 2003 12:40 pm Post subject: Hiding seconds with html_select_time |
|
|
Hi, I have created a form where I want users to enter hours and minutes, but not seconds. I have set the display_seconds attribute to false, but the seconds field is still appearing. e.g.
{html_select_time display_seconds="false" prefix="system_end_" use_24_hours="true"}
Any ideas? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Jul 30, 2003 12:57 pm Post subject: |
|
|
use ...umm... false not "false" . "false" is a string that contains characters and the funky automatic type conversion of php says it's a boolean true . but false (without quotes) is a boolean false (or and empty string). okay?
overall it's:
{html_select_time display_seconds=false prefix="system_end_" use_24_hours=true}
HTH
messju |
|
Back to top |
|
astroboy Smarty n00b
Joined: 22 Jul 2003 Posts: 4
|
Posted: Wed Jul 30, 2003 2:25 pm Post subject: |
|
|
Hey thanks. I wasn't quite sure where smarty ended and php started, and I erroneously thought that smarty attributes had to be quoted. I fudged it with the ugly "0" for false, but I'll correct it now. Thanks again. |
|
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
|