Re: maintaining state in multipage form

2006-03-13 Thread Christophe Maso
The only problem with that is that the form isn't linear; in addition to to the 
"previous page/next page" links, each page has a direct link, so the user can 
go straight to page 56 if they don't want to have to click "next page" 55 
times.  But you're right; the bottom line is that each click needs to result in 
the page's form vars being passed to the next page, which means either 56+ 
submit buttons or maybe some kind of onClick=form.submit() mechanism.

It's a little simpler since I'm dealing only with checkboxes (all have the same 
name), so I get a comma-delimited list with each submit without having to do a 
loop, but then the question is how to remove widget IDs from the cumulative 
list if the user goes back and unchecks them.  E.G., user goes to a page and 
checks the boxes for widgets 42, 44, and 61.  Later they go back to that page, 
uncheck widget 42, and visit another page. Widget 42 has been unchecked, but it 
still hasn't been removed from the cumulative list, because unchecked 
checkboxes submit nothing.  Hence my idea to create a list or structure that 
looks like "widgetID|pagenumber, widgetID|pagenumber, widgetID|pagenumber..." 
with each submission, first remove all elements from the cumulative list that 
have pagenumber=submitting page's pagenumber, and then append the  received 
widget IDs currently being passed.

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235273
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: maintaining state in multipage form

2006-03-13 Thread Massimo Foti
Have you considered splitting the form accross different tabs and keep it on 
the same page?

Here you can see a barebone example:
http://www.olimpo.ch/tmt/tag/tabs/sample_form.cfm

You can get the custom tag from here:
http://www.olimpo.ch/tmt/tag/tabs/


Massimo Foti
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235227
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: maintaining state in multipage form

2006-03-13 Thread Stan Winchester
Why not just pass the values around in hidden fields and then test for them as 
follows:

Put this on the next/prev form pages

  


Put this on the form page
 checked="checked" />

Change the next/prev links to named submit buttons. If you need to maintain the 
apprearance of links, then just format them with css to look however you want

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235226
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: maintaining state in multipage form

2006-03-13 Thread Christophe Maso
Think I might have the solution - in the session array or list, save each 
element in the list as [widgetid]|[pagenumber].  Submit each page to the next, 
appending the session var with the checked widgets' ids, but first REMOVE all 
widgets from the list that have the submitting page's number.  That way, 
widgets remain in the session var if and only if they are still checked (I'm 
overwriting the page's contents with each submission, for all intents and 
purposes.)

Thanks much- I'll post again on how well it works...

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235217
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: maintaining state in multipage form

2006-03-13 Thread Christophe Maso
True, but then the user needs to be able to go back to any form page they've 
been to, uncheck boxes if they want, and have those values effectively removed 
from the session array...

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235201
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: maintaining state in multipage form

2006-03-13 Thread Jeremy Bunton
You could call a javascript function to submit the form, then boot off to
the page in the 

-Original Message-
From: Christophe Maso [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 13, 2006 8:33 AM
To: CF-Talk
Subject: Re: maintaining state in multipage form

>It sounds like a session variable containing an array of checkboxes and
>their selected values might be in order.  Assuming the user has cookies
>enabled (or if you pass the session tokens on the URLs) this should be
>fairly simple to implement.
>
>-Justin
>
>
>>

I'd considered using a session var, but then it occurred to me that there's
no way to save the checked values to a session list or array until the
submit button has been clicked.  I could start on page 1, check a few boxes,
and then click on the link for page 2 (or 3 or 4).  At that point, page 1's
checked boxes have been forgotten.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235193
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: maintaining state in multipage form

2006-03-13 Thread Christophe Maso
>It sounds like a session variable containing an array of checkboxes and
>their selected values might be in order.  Assuming the user has cookies
>enabled (or if you pass the session tokens on the URLs) this should be
>fairly simple to implement.
>
>-Justin
>
>
>>

I'd considered using a session var, but then it occurred to me that there's no 
way to save the checked values to a session list or array until the submit 
button has been clicked.  I could start on page 1, check a few boxes, and then 
click on the link for page 2 (or 3 or 4).  At that point, page 1's checked 
boxes have been forgotten.

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235191
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: maintaining state in multipage form

2006-03-12 Thread Justin D. Scott
It sounds like a session variable containing an array of checkboxes and
their selected values might be in order.  Assuming the user has cookies
enabled (or if you pass the session tokens on the URLs) this should be
fairly simple to implement.

-Justin


> -Original Message-
> From: Christophe Maso [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, March 12, 2006 6:52 PM
> To: CF-Talk
> Subject: maintaining state in multipage form
> 
> I've taken over a web application where at one point, the 
> user has a long list of items to choose from to be compared 
> to one another.  Each product has a checkbox next to it, and 
> after checking off those products the user wants to see, the 
> user submits the form and views a comparison table.
> 
> This would be simple if the form were all on one page, but 
> it's not.  Since there can be potentially be a lot to choose 
> from, the form is codes to display only 30 or so items at a 
> time.  There's hyperlink navigation at the bottom of the page 
> to go to next/previous page, or to go to page x, in order to 
> see other items.  Clicking on any of these links executes a 
> new request and the previous page's checkboxes lose their 
> state.  So right now the user can only compare items if they 
> happen to be listed on the same page in the same group of 30.
> 
> I need the user to be able to check boxes on any page and 
> jump around to other pages of the form, checking or 
> unchecking as they want, and have the form maintain it's 
> overall state for when they finally submit.  Any leads on 
> where I can get some tips on how to do this?
> 
> Thanks,
> Christophe
> 
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235162
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54