Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

html options from template
Hi,

I would like to have my options come from the template to make it easy
for designers to add/edit them instead of assigning from a PHP array.

Something like this

<select name="hdegree">
<option value=""></option>
<option value="High School" {isselected v=$hdegree o="High School"}>High
School</option>
<option value="Trade School" {isselected v=$hdegree, o="Trade
School"}>Trade School</option>
<option value="Associates Degree" {isselected v=$hdegree, o="Associates
Degree"}>Associates Degree</option>
<option value="Bachelor Degree" {isselected v=$hdegree, o="Bachelor
Degree"}>Bachelor Degree</option>
<option value="Advanced Degree" {isselected v=$hdegree, o="Advanced
Degree"}>Advanced Degree</option>
</select>

But would like it easier. I don't think this assign is valid but just
for sake of how I would like to do it.

{assign var=degrees value=array("High School","Trade School","Associates
Degree","Bachelor Degree","Advanced Degree")}

<select name="hdegree">
{html_options values=$degrees output=$degrees selected=$hdegree}
</select>

Maybe a variable modifier could turn something like this into a smarty
array variable?

{"High School,Trade School,Associates Degree,Bachelor Degree,Advanced
Degree"|arrayify:"degrees"}

Thanks,
Dustin

Report this thread to moderator Post Follow-up to this message
Old Post
Dustin
04-23-05 01:58 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:23 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.