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

Re: [SMARTY] Repost...
Does {html_options} not work for you?

Rob Adams wrote:

>I posted this before, and maybe I wasn't clear on the problem.  It sounds
>clear to me, but I'm dealing with it, so I already understand it.  Can
>anyone help me?  Or do you need more information?  Thanks.
>
>
>
>I have a situation where I need to display a variable number of shipping
>address forms, depending on user input.  Since there is no built in for or
>while loop, I used {php}tags to setup a loop through the address forms.
>
>Everything is working great, except one part:
>{select name=sstate test=$ship.$addrcnt.state}
>
>
>This is a custom function I've made, to help put the text 'selected' in the
>right spot on select/option fields.  Anyway, you can see what I'm trying to
>do here, but it obviously doesn't work.  Is there any way I can make this
>work?
>Below is the line in context:
>
>                       <select name="ship[{$addrcnt}][state]"
>class="listbox" >
>                         <option value=""> Select State </option>
>{select name=sstate test=$ship.$addrcnt.state}
>{foreach from=$states item=state}
>             <option value="{$state->code}" {select name=sstate
>value=$state->code}>{$state->state}</option>
>{/foreach}
>                       </select>
>
>Thanks for any help.
>
>  -- Rob
>
>
>

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


Re: [SMARTY] Repost...
{html_options} works!  I've never used it before because I rarely, if ever,
have the array(s) it needs to work.  Guess it's worth it to create the
arrays.  Thanks.

I'm curious though.  How come {html_options} is able to recognize the value
of $ship.$addrcnt.state and my own function was not?

-- Rob



"Monte Ohrt" <monte@ispi.net> wrote in message
news:41D9A130.8090208@ispi.net...
> Does {html_options} not work for you?
>
> Rob Adams wrote:
> 

Report this thread to moderator Post Follow-up to this message
Old Post
Rob Adams
01-04-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:41 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.