Sebastien de Castell
|
| Posted: 02/10/2003, 10:21 PM |
|
Hi Folks,
I'm using CodeCharge Studio 2 Beta 2 with PHP 4 and MySQL
I have a form for entering a person's registration to an event. When a
person is registered for an event they have to pay a fee depending on the
category of registrant they are (for example, if in-house employee $150, if
external $300). So there is a registrant category listbox for entering that
value into the table. However the actual fee can be overridden by the staff
person entering the amount, thus the actual fee is stored in the table too
(so that even if a person is external, instead of being charged $300, the
staff person might decide to charge them only $225).
So, to make all this work, when the staff person changes the value of the
fee schedule listbox, I need the value in the fee field to be changed and
the screen refreshed.
Can anyone tell me how to implement this using PHP? I assume I have to do
something with the On Change event, then look up the value, then set the
form field and then refresh the screen, but I'm not sure how to go about
doing that.
Thanks in advance,
Sebastien
|
|
|
 |
Kasper Pedersen
|
| Posted: 02/11/2003, 2:43 AM |
|
First the JavaScript submits the form OnChange
Secondly BeforeUpdate (PHP) should do the lookup and field changes
- you might want to change the Redirect settings here too
Best regards
Kasper
"Sebastien de Castell" <decastell@hotmail.com> wrote in message
news:b2a4p2$gka$1@news.codecharge.com...
> Hi Folks,
>
> I'm using CodeCharge Studio 2 Beta 2 with PHP 4 and MySQL
>
> I have a form for entering a person's registration to an event. When a
> person is registered for an event they have to pay a fee depending on the
> category of registrant they are (for example, if in-house employee $150,
if
> external $300). So there is a registrant category listbox for entering
that
> value into the table. However the actual fee can be overridden by the
staff
> person entering the amount, thus the actual fee is stored in the table too
> (so that even if a person is external, instead of being charged $300, the
> staff person might decide to charge them only $225).
>
> So, to make all this work, when the staff person changes the value of the
> fee schedule listbox, I need the value in the fee field to be changed and
> the screen refreshed.
>
> Can anyone tell me how to implement this using PHP? I assume I have to do
> something with the On Change event, then look up the value, then set the
> form field and then refresh the screen, but I'm not sure how to go about
> doing that.
>
> Thanks in advance,
>
> Sebastien
>
>
|
|
|
 |
|