Forums

How to Save/Display Multiple Values in a Single Field

swmckay 03 Nov, 2011
Hello,

Using Joomla 1.7 / Chrono V4

I have built a multi-page form using the session-to-data/data-to-session tool to pass and display data:

page1: collect data/save to db1
page2. collect additional data/save to db2
page3. display data from pages 1 and 2 using the session

Overall it works properly accept when it comes to the field on page 2 where the user can select/save multiple cities. The idea is to allow the user to select between 1 to 10 cities but it doesn't display the cities on page 3 during the session or when it's called from the database later on.

1. using the data-to-session tool all that comes through is "array" everything displays properly
2. when I log out and back in to end the session, the call to the database loads everything accept the multiple cities data (comes up blank)

I believe I may need to do something differently regarding using an array but I'm not sure if/how to do that.

Any guidance is appreciated
?
Guest 03 Nov, 2011
hi there,

you could try this:
on page 2 add a handle arrays event to the on submit and enter your delimiter of choice in Delimiter.
on page 3 in the db record loader enter the field name of your select box in Array Fields Sets
and your separator of choice in Array Separators
make sure the delimiters in the 2 actions correspond
GreyHead 04 Nov, 2011
Hi swmckay,

Gabriela's solution sounds right to me. You need to handle the array from the multiple selection carefully at each step.

Note also that ChronoForms has a bug in republishing data from multiple selections (I'm not sure if this affects you or not). There's a fix linked from the CFv4 RC2.0 bug list post in the CFv4 forum.

Bob
swmckay 08 Nov, 2011
Thank you gentlemen!
This topic is locked and no more replies can be posted.