Checkbox has to be checked to go to next page

I need to create page that has a checkbox which has to be ticked before you
can press OK to proceed to the next page.

I’ve had a search on the KB and Google, but don’t really know where to
start.

I have a feeling there are many ways to do this!

Suggestions please ;~}

Best wishes Peter


Peter Tucker, Oxford UK email@hidden


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Peter,
An easy way to do is this is to use the Validate Form Suite actions
(http://www.actionsforge.com/actions/view/114-validate). Attach the validate
action to your checkbox and it will stop the user from proceeding unless it is
checked. If you don’t have anything to process the form data (a PHP script for
example) you can just add the resulting page (the page the user should go to)
to the Page/Form Setup/Action area and set the form method to post.
Now when the user checks the checkbox and hits the submit button they will be
redirected to the correct page. Without the check the user is prompted to tick
it before they can proceed.
A quick a simple solution but it falls down if the user doesn’t have JavaScript
enabled. It is also not secure as the target page can be seen in the source
code. However it will do the job quite well IMHO.
Regards,
Tim.

Quoting Peter Tucker email@hidden:

I need to create page that has a checkbox which has to be ticked before you
can press OK to proceed to the next page.

I’ve had a search on the KB and Google, but don’t really know where to
start.

I have a feeling there are many ways to do this!

Suggestions please ;~}

Best wishes Peter

Extend Freeway the way you want with FreewayActions.com
http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Peter,

as Tim mentioned the Validate form suite would help but to handle this server side… it may help you to know that the PHP easiForm action allows you to set this up using 2 radio buttons, one might have the text ‘I agree with the terms’ and the other with the text ‘I do not agree’ or could be ‘Over 16’ and ‘Not over 16’ depending on what you want them to agree with to send the form, so…

  1. Add 2 radio buttons to the form
  2. Give them both the ‘Name’ of ‘i_agree_with_terms’ or whatever (without quotes, no spaces)
  3. Give one a ‘Value’ of ‘yes’ the other with ‘no’, check the ‘Checked’ checkbox in the radio button inspector for the radio button with the ‘no’ value.
  4. Enter a value of ‘i_agree_with_terms’ or exactly whatever you called the radio cluster (without quotes) in the ‘Agree name’ field of the PHP easiForm action
  5. Upload the form

Now if the form is posted it will return a user error to alert the user and load the form again.
There is a link to download a PDF on the PHP easiForm action suite on this page:
http://www.easibase.com/freeway/freewayactions.php

Sorry the internal index links in the PDF document are not live, haven’t managed to get around that yet but it outlines the whole process in setting up a form with the PHP easiForm actions using a table in Freeway.

There is a small price to pay for the actions but maybe it is worth it, doesn’t cost anything to set it up and try to see if it suites your needs.

HTH


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I think if you use POST to an HTML page, you’ll get a server error.
Try using GET instead, and if you want to be extra clever, add a field
for the visitor’s e-mail address. Then make sure your server is set to
log the query_string portion of URLs, and you will have a record of
who went into your page. The resulting hit will look like this:

http://example.com/secretPage.html?email=someoneHexample.org&check=yes

Walter

On Mar 18, 2009, at 3:11 PM, email@hidden wrote:

to the Page/Form Setup/Action area and set the form method to post.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Aha, good point Walter. I was thinking that post would avoid the form data
showing up in the URL but I guess seeing this show up in the logs is a good
idea as you say.
Thanks,
Tim.

Quoting Walter Lee Davis email@hidden:

I think if you use POST to an HTML page, you’ll get a server error.
Try using GET instead, and if you want to be extra clever, add a field
for the visitor’s e-mail address. Then make sure your server is set to
log the query_string portion of URLs, and you will have a record of
who went into your page. The resulting hit will look like this:

http://example.com/secretPage.html?email=someoneHexample.org&check=yes

Walter

Extend Freeway the way you want with FreewayActions.com
http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Tim, Mike and Walter,

I’ll review my options Š

I do like Mike’s potted solution, which would probably be easier, my only
issue with it is the cost, if I were to adopt it I’d almost certainly find a
use for it on many sites, and that would get really expensive for the odd
form on multiple sites.

The original request is for a friend, who I’ve just converted to FW from
GoLive. I’ve passed it all to him.

on 18/03/2009 20:32, Tim Plumb at email@hidden wrote:

Aha, good point Walter. I was thinking that post would avoid the form data
showing up in the URL but I guess seeing this show up in the logs is a good
idea as you say.
Thanks,
Tim.

Quoting Walter Lee Davis email@hidden:

I think if you use POST to an HTML page, you’ll get a server error.
Try using GET instead, and if you want to be extra clever, add a field
for the visitor’s e-mail address. Then make sure your server is set to
log the query_string portion of URLs, and you will have a record of
who went into your page. The resulting hit will look like this:

http://example.com/secretPage.html?email=someoneHexample.org&check=yes

Walter

Extend Freeway the way you want with FreewayActions.com
http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Best wishes Peter


Peter Tucker, Oxford UK email@hidden


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options