Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

using Multiple Listboxes

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
paragshah79
Smarty n00b


Joined: 31 Jan 2005
Posts: 4

PostPosted: Mon Jan 31, 2005 1:31 pm    Post subject: using Multiple Listboxes Reply with quote

I am using a dropdown of states and on change of state i am populating a list box with cities in that state from the database. Now i want to use another list box and add / delete the values from list box 1 to list box 2.

How can i do that? On submit of the form i require the values to selected in the 2nd list box to be inserted in the database.

can any one help me out?
Back to top
View user's profile Send private message MSN Messenger
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Mon Jan 31, 2005 3:33 pm    Post subject: Reply with quote

Take a look at Smarty Formtool

http://www.phpinsider.com/php/code/SmartyFormtool/
Back to top
View user's profile Send private message Visit poster's website
paragshah79
Smarty n00b


Joined: 31 Jan 2005
Posts: 4

PostPosted: Wed Feb 02, 2005 1:35 pm    Post subject: Reply with quote

Thanx mohrt

That smarty tool solved my problem up to some extent.

I have a drop down with states. On selecting a state it populates a list box with Cities for that state.

I can select multiple cities from 1 listbox to 2nd listbox.

BUT THEN

I also want to select another state which again populates the 1st Listbox with cities.

At this point i want the cities selected earlier to remain in my 2nd listbox and i can add more cities on that.

On Clicking save i want to pass state - city relation to next page for saving

WHILE SAVING

I am inserting a State and a City in each row

STATE A --> CITY 1
STATE A --> CITY 2

I want to also Insert

STATE A --> CITY 1
STATE A --> CITY 2
STATE B --> CITY 1
STATE B --> CITY 2
STATE B --> CITY 3

Hope i am confusing you.

Can you help me out.

Thnx

Parag
Back to top
View user's profile Send private message MSN Messenger
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Feb 02, 2005 2:43 pm    Post subject: Reply with quote

I don't think there are any smarty tools for your specific need, you'll have to do some custom javascripting.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP