Passing form values from one page to another means you have to process the form submission from the first page on the second form page. You can see what your first form is actually sending by setting the form Action (in the Form Setup dialog) to point to Reflector
I recommend you look at this output before you go further, because naming checkboxes and giving them values that will pass through to your second form handler is non-intuitive, and a check box that is not checked is not even sent to you – I know that caught me out quite a few times.
Your first form page would be set up manually (no Action needed). Instead of pointing it at my Reflector, you would set its Action to the filename of the second form page. Before you do that, you would set the second form page itself to have its filename end in .php.
Next, you would create the “pass-through” fields as hidden form elements, using the Page / Form Setup dialog. This is probably the easiest way to make this work, since you would only need to do this small part by hand, and the rest of the form handling (on the second form) could be managed through an Action like Softpress’s Send Form or Tim Plumb’s PHP Feedback Form Action.
So here’s what you want to end up with when you’re done (in HTML) on the second form page:
<input type="hidden" name="foo" value="<?php if(isset($_REQUEST['foo'])) echo $_REQUEST['foo']; ?>">
(And here, I am using the traditional “foo” variable name to stand in for
whatever_you_named_the_checkbox_in_your_first_form. You would have set this in the Inspector, in the third tab from the left, in the Name field. Nothing – no other field in the Freeway interface – will do in place of this choice. This is case-sensitive, and should begin with a letter a-z and not contain any spaces or punctuation besides the underscore.)
So to get Freeway to create this hidden variable, you would (on the second form page) open the Page / Form Setup dialog, and locate the Hidden Fields section of that dialog. Click New or Add (don’t have it open in front of me) and you should be able to edit two values: name and value. In the Name field, you want to enter whatever you called the checkbox in your first form (note: exactly the same, case and everything). In the Value field, you want to type the following, but substitute the actual name of your form field for ‘foo’. All quotation marks must be true “typewriter” quotes, not “curly” or smart quotes. Freeway won’t do this for you, but recent versions of Mac OS have begun to do it in lots of places you wouldn’t expect them to, so be aware.
<?php if(isset($_REQUEST['foo'])) echo $_REQUEST['foo']; ?>
Repeat these steps for the other check boxes. What you have done now is to make a single form (the second one) that you can process the way you are accustomed to in Freeway (with an Action) that includes fields from a previous form that submitted to it.
This has taken me longer to type out than it will for you to do the first time, and from then on, it may get simpler. If you are truly afraid of code, this is a very tiny way to get started working on that problem. (Note very carefully: if you expect to make any reasonable living at Web design, you have to work on this problem and master it. Your fear will be your undoing, as Yoda might have said, albeit with much stranger syntax than I can summon at this early hour.)
freewaytalk mailing list
Update your subscriptions at: