-----Original Message-----
From: Richard Davey [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 16, 2004 6:43 AM
To: Kacey A. Murphy
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Forms, ListBoxes, Validating Errors.

Hello Kacey,

Friday, January 16, 2004, 11:33:22 AM, you wrote:

KAM> What I have is an issue with posting forms with Dynamic ListBoxes.
KAM> What happens is when you fill the form out, and hit submit, it
KAM> validates the form .. if there is a required field not filled out, it
KAM> comes back and gives an error. All the textfields have all the 
KAM> information and the Static ListBoxes have all the information they 
KAM> filled out... But if the user
KAM> selected a STATE (which is pulled dynamically) it will reset this box
KAM> to the default setting.

RD > It will reset it when the page reloads with the error message, yes?

KAM> function build_states_tree(&$output, &$preselected) {

RD > You already have the preselected variable in your function, so why not
RD > just pass in whatever the user previously selected back to it again?
RD > (i.e. over-ride whatever the initial preselected was?)

----------------

I think that makes sense I will tweak the code for a little bit to see what
comes of it. 

Just wasn't quite sure how to make the code correctly and efficiently.

Thanks so much for the quick respons.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to