Forums

How to not show form when $_GET values are not present?

huubs 17 Feb, 2020
Hello,

I want to not show my form when there are no $_GET values present. I got it somehow working with the following code, but die() obviously stops all PHP processing which means a blank page with my text printed on it. Is there some sort of way to not render the form?
<?php

$date = $_GET['date'];


if($date != ''){
$form->data['date'] = $date;
} else {
echo "No GET values present";
die();
}

?>
GreyHead 17 Feb, 2020
Answer
Hi huubs,

You can use an Event Switcher action to either Display the form - or do something else.

Bob
This topic is locked and no more replies can be posted.