Forums

How to prevent the form from loading when READ returns no record

vdneut 30 Apr, 2023
Hi,
Is it possible to prevent the form from loading and only show a message like 'record not found' in case the Read Data action gives a not_found?
I use a url field like &token=xyz to identify the record.

I tried Actions/Basics/Redirect and then point to an empty page in the same or different Page group, but that ended in some kind of loop.
In the old days... it was the Show Stopper event that did the trick, but in CF7 I can't find any.

Regards,
Nico
Max_admin 01 May, 2023
Hi Nico,

A redirect to page in a different page group should work, or to a different page on your website.

The form way is to use the "Run Conditions" behavior to check the returned value from the Read Data and run the views in that case only.

So you may place all your views inside one "Group" view and apply the run conditions to that view only.
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
vdneut 02 May, 2023
Yes, that works. Used a {var:read_data_result} -which is the Unit Name of the Read Data action- is not empty condition in "Run Conditions". Nice!
Thanks.
Nico
You need to login to be able to post a reply.