Page 1 of 1

Maintain form data

Posted: Thu Jul 21, 2005 3:18 pm
by vincois
I have basiclly 2 forms on 1 page. The first one is event specific information. The second one allows you to pick a name from a drop down list and see what other events that person is assigned to. The issue I have is if you insert data into the first form and then go down and select a name on the 2nd form you lose the data entered on the 1st. I want to maintain that data so it does not need to be re-entered when checking names on the 2nd. Any suggestions or links to somewhere or someone that may have done something similar is appreciated.

Thanks

Posted: Thu Jul 21, 2005 3:41 pm
by Burrito
first question: why are you using two forms to do that?
second question: why are you using two forms to do that?

solution:
use an onChange event from the select to populate a value of a hidden form field on the second form with the value selected from the first.

Well

Posted: Thu Jul 21, 2005 6:34 pm
by vincois
The 1st form is data that is event information like travel dates, show dates, job positions for that event and some other specific items. The 2nd form gives you the ability to look up a person while still viewing the above data to see if a certain person is booked over that time frame. Having a pull down list at the time seemed simplier then sorting through a large amount of dates for certain person, on a certain range of dates. I have come far in my knowledge of PHP but I still have a loooong way to go. If you can think of a more efficant way, I game. I would rather email the snippets of code if you want to view them, some are kinda large given my greeness. But hey they work :P

Posted: Thu Jul 21, 2005 6:43 pm
by ol4pr0
I think you need to look into javascript for this.

PHP can not help you in the way you want to do it.

Posted: Thu Jul 21, 2005 6:57 pm
by Burrito
well if you're dead-set on keeping them in two different forms, do what I suggested above, if you need help with that let me know and I will provide.