logo       

Re: [Checked]: msg#00569

web.interchange.users

Subject: Re: [Checked]

At 08:18 PM 06/13/2001 -0400, you wrote:
You just need to explicitly reset the value after displaying the input:

<input type=checkbox name=foo value=1 [checked foo 1]> Foo
[value name=foo set='' hide=1]

That way, the next time the form is submitted, foo will be empty (unchecked) unless they check/leave checked the box. Note: when you have multiple checkboxes for one variable name, this needs to change a bit:

<input type=checkbox name=foo value=1 [if value foo =~ /1/]checked[/if]> Foo 1
<input type=checkbox name=foo value=2 [if value foo =~ /2/]checked[/if]> Foo 2
... <!-- etc -->
[value name=foo set='' hide=1]

The problem i am having is if the form does not meet the error checking (profile) it redisplays and tells them what they need to fill out. if they uncheck an item and keep looping (not filling out the data) the items are then rechecked. resetting it at the bottom would work but they'd have to reclick everything they originally wanted. so if they make 10 mistakes (yes Im sure there are some people out there capable of this), they have to recheck their choices each time.

Unless Im missing something.

You are. Their choices from the last go around will be reflected in the checked / unchecked setting of each box *in the html*. The [value ...] is reset at the end to clear that element of the interchange Value hash (like $Values->{foo} = '') so that the 'memory' of the value does not override the next form submission, which is what is happening to you now.

- Ed L.


I have to look at Rakce's code he just posted.

_______________________________________________
Interchange-users mailing list
Interchange-users@xxxxxxxxxxxxxxxx
http://lists.akopia.com/mailman/listinfo/interchange-users

===============================================================
New Media E.M.S. Software Solutions for Business
463 Main St., Suite D eCommerce | Consulting | Hosting
Placerville, CA 95667 edl@xxxxxxxxxxxxxxx
(530) 622-9421 http://www.newmediaems.com
(866) 519-4680 Toll-Free (530) 622-9426 Fax
===============================================================




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise