Thomas Sutton | 26 Oct 03:02

Re: HTTP redirects in CVT forms

Hi Matthieu,

On 23/10/2009, at 11:50 PM, Matthieu Marcillaud wrote:

> Le 22/10/2009 12:40, Thomas Sutton a écrit :
>> Hi All,
>>
>> I'm working on a new site that needs to be able to redirect the  
>> user to
>> one of a few pages depending on the values provided in a form. The  
>> form
>> is currently implemented with CVT, but I'm open the changing it, if
>> required.
>>
>> Is it possible to redirect the client in the formulaires_*_charger()
>> functions used in CVT forms? If this isn't possible with CVT, I'll  
>> need
>> to write a "normal" dynamic tag, won't I?
>
> You can redirect in the «traiter()» function by returning a key  
> 'redirect' to the array, with the URL in the value. I think it's the  
> best way perheaps maybe I don't understand what you want exactly.

This is exactly what I was looking for. I was just calling  
header("Location: ...") in the traiter function, but this is "better",  
I think.

Thanks!

Thomas Sutton

bouncingorange
graphic+web design

Gmane