Forums

A very weird request...

Umbrella 03 Jun, 2015
Okay, first off, great component. You are our goto on all installs for a forms generator. Thanks!

Here's my challenge - I have a client, a law office, who is asking that before a person can submit a form, the user must agree to some disclaimer terms.

Example (this is NOT my client): http://www.foulston.com/Attorneys/Details/Stanley-Andeel

At the top, when you click Send Email, you'll see a popup with text you have to agree to in order to email the person.

My client wants this to happen on their contact page before the person can submit the form (doesn't have to be a popup, but the person has to agree before they can fill out and submit a form). And, unfortunately, they won't accept any other solution like warning text above the form, etc. Believe me, I tried!

So how to do this in Chrono? Maybe a 2-part form? Sorry, I'm a little stumped.
GreyHead 03 Jun, 2015
Hi Umbrella,

It will be a two step process. Unless you know that there will only be one form I think I'd use a separate form for the disclaimer.

At the start of the On Load event for the contact form add an Event Switcher and have that check for a 'disclaimer' session variable. If it's not set redirect to the disclaimer form with a return url; if it is set continue to the form.

In the disclaimer form show the form on a page, on submit set the disclaimer value in the session and redirect to the previous form.

As you are using session variables you could store the return url there too (just remove it when they return).

Bob
Umbrella 03 Jun, 2015
I wonder if this could be an onFocus event instead (if such exists) so if the person clicks in a field of the form, it brings up the disclaimer? Or am I nuts?
GreyHead 03 Jun, 2015
Hi Umbrella,

You could do it in JavaScript I guess . . . that's practical but not wildly secure as you do get an odd user with no JS enabled.

This code will do it - it shows an alert the first time you click inside a form div - you probably need to make the selector more specific if there is more than one form on the page:
jQuery(document).ready(function(jQ){
  var disclaimer = false;
  jQ('.gbs3').on('click', function() {
    if ( !disclaimer ) {
       alert('You clicked on a form');
       disclaimer = true;
    }
  });
});

Bob
Umbrella 03 Jun, 2015
Thank you, we'll take a look. Appreciate the great support, as always.
This topic is locked and no more replies can be posted.