Sometime I use a switch to check a condition, show a message and do a redirect, something like:
{var/empty:myFunction}
true:{error:Wrong value}{redirect:myEvent}
Now I tried the same logic to check an upload function:
{var/empty:UploadFn}
true:{error:wrong file type}{redirect:myEvent}
but it doesn't work. Instead of redirecting a blank page is displayed.
To get the expected behaviour I had to create 2 switches like the following:
{var/empty:UploadFn}
true:{error:wrong file type}
and
{var/empty:UploadFn}
true:{redirect:myEvent}
maxx
{var/empty:myFunction}
true:{error:Wrong value}{redirect:myEvent}
Now I tried the same logic to check an upload function:
{var/empty:UploadFn}
true:{error:wrong file type}{redirect:myEvent}
but it doesn't work. Instead of redirecting a blank page is displayed.
To get the expected behaviour I had to create 2 switches like the following:
{var/empty:UploadFn}
true:{error:wrong file type}
and
{var/empty:UploadFn}
true:{redirect:myEvent}
maxx