You had me pulling my hair out on this one for a while… Basically the forms did not work and the error was thrown because the file you sent me through did not have a Submit button, you had the image but the ‘Submit’ option was not selected… so how did the form get sent to the next page? you had the ‘Next page’ image set with a link to the next page!!! Well, you had me calling myself some names after that, I just could not work out how the array was not being passed when the $POST was set and the form appeared to be going to the page it was supposed to go to… %^%+***!
The error was thrown because no array existed, your form was being directed to the next page on pressing a ‘linked image’ and not on ‘Submit’ the array was not actually getting sent… so it didn’t exist, I have altered a little bit of the code to check that there is an array passed although once set up as they should be this should not be necessary although it does not need to be there, the code to change is as follows:
<?php
if (!isset($f)) { $f = (isset($_POST['f'])) ? $_POST['f'] : ''; }
foreach ($f as $key=> $value) {
echo '<input type=hidden name="f[' . $key . ']" value="' . $value . '">';
}
?>
to
<?php
if (!isset($f)) { $f = (isset($_POST['f'])) ? $_POST['f'] : ''; }
if (is_array($f)) { // Stop errors when empty.
foreach ($f as $key=> $value) {
echo '<input type=hidden name="f[' . $key . ']" value="' . $value . '">';
}
}
?>
Now on to the main problems:
-
You form is on various layers, you should place everything that is form related 'including the submit button or image on one layer, the easiest way to do this is to build the whole form within a table, the whole thing in ‘one’ table. Use the different cells to place the markup item with the php code, the form text, your radio buttons and the submit button. The text doesn’t * need * to be there but if it is then the text and related radio buttons will sit on the page related to each other.
-
If you use an image for a submit button then it needs to work as a ‘Submit’ button. Giving an image a hyperlink does not make it a submit button, it makes it a link, so…
Remove the hyperlink from ‘Next Page’ images on each page, then when the ‘Next Page’ image is selected you should check the box for ‘Submit’ in the inspector, this will then make the image submit the form.
-
On the ‘Interm Evaluation’ page you ‘I think’ are trying to use text areas for user input for the ‘Please feel free…’ sections, you have the easiForm Elements action applied to two items, I have not a clue what these originally where ‘I suspect HTML items’ but they are selected as .gifs, which is not any use at all as these items cannot be used as text areas, you should replace these two items with actual ‘text areas’.
Nothing to do with the forms function but…
- You have not given any ‘Name’ or ‘Value’ to any of the radio buttons in each cluster, you have just let Freeway set automatic values, so when you form comes through you will get:
Cluster1: item3
Cluster2: Item7
Cluster3: Item11
etc. etc.
What you should do is give all of the radio button in each cluster the same name, a name that related to that radio button selection, on the first page that could be:
Cluster1 name: ‘roles_described’ with each radio button having a value from 1 through to 5 relatively.
Cluster2 name: ‘plan_communication’ with each radio button having a value from 1 through to 5 relatively.
etc. etc.
This will then result in the information coming back in the email as:
Roles described: 2
Plan communication: 5
etc. etc.
Please note that anything that has the ‘PHP easiForm Element’ action applied to it cannot have a space in it’s ‘Name’ although the ‘Value’ could if that where ever needed. If you want a space to show in the message that is returned then use an under slash as the example above does, the first char of the ‘Name’ will be converted to an uppercase letter as the above example also shows.
-
You have added the ‘Form Element Styler’ action to every radio button, you are not using this to do anything so there is no real point in it being there, this does not affect the function of the form but it sets a style for every radio button it is applied to without any need to.
-
Every bit of text on your pages are selected to be .gifs! Not sure why you are doing that but it would be better to use ordinary html text, that is what I would do rather than covert all the text to images and stop the second of alt text showing before the text images load, this will also reduce the size of your pages.
I guess that is a lot to sort out but you really don’t have a lot of options if you want to get this working, keep us up to date as to your progress.
HTH
On Jul 18, 2012, at 10:4 PM, tonzodehoo wrote:
Hello Mike,
Cheers. I’ve emailed it through to you. Let me know how you get on.
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options