Re: quickform : how to modify values before process
| From: | Justin Patrin | Date: | Sat, 31 Dec 2005 00:20:43 +0000 |
| Subject: | Re: quickform : how to modify values before process | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22396@lists.php.net to get a copy of this message | ||
On 12/30/05, Julien Tschäppät <julien35@gmail.com> wrote:
> Hi,
>
> I have made an order form.
>
> Each item is composed of two fields. In the first the customer give
> the number of items he want. The second field show the price of the
> item(s). Its value is calculate in a javascript function.
>
> When the customer submit the form I call the freeze() function to show
> a recapitulation of the order and the customer have to click a second
> time on the submit button to confirm his order.
>
>
> My problem : if javascript is disable the price is not calculate
> (logical :-) ). What can I do to update the fields before the freeze ?
>
>
Just calculate the price and set it before you freeze. *Always* do
this server-side. You can't trust values that come from the form, a
user can easily override these.
--
Justin Patrin