PHP easiForm & Freeway 4 Pro

I downloaded and installed the Freeway action for PHP easiFORM from http://easibase.com. All seems to be working fine except… THIS IS THE PROBLEM… Radio buttons and CheckBox results do not get processed in the form response emailed back. And the “Submit Button” dosn’t work on PC I.E browsers?.. “Submit Button” Works fine on Mac’s FF & Safari though. Can anyone help with this? I have mailed easibase but no answer as yet, and I pushed for time on this. I even bought a license for it too, hmmmmmmmm.


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

You can view the form online at www.warnandinform.com/cityoflondon/upgradeform.php Like I said above the Submit button works fine on Mac’s, just not PC’s. Help on this would be good fellow Freewayeerrrrs!


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

Hi Mark,

Can you send me a copy of: upgradeform.php so I can take a look at the
code and so hopefully tell you what is wrong.

Mike


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

Mark, I quickly took a look at the code on the page…

What happens when you submit a web form is the various element values are passed on, in easiForms case then these values are formatted for the email and sent through to you, so each radio button and each checkbox needs to have a value so as to know what the user has selected. Your checkboxes and radio button values are * all * empty… and so that’s why you are not getting anything passed on.
Step 6 in the tutorial mentions this: “Note: Radio buttons have the same name for the cluster group but a different value for each radio value.”… granted it does not clearly state that * you * need to give each of these their value, I will change the text in the tut to be a bit clearer.

When you send me the actual form I will look at the other problem you are having.

Mike


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

Mark just to update the post on this…

The ‘PHP easiForm Element’ action reads the Freeway elements on your form and in your Freeways case was reading the radio and checkbox elements ‘tags’ as UPPERCASE and not lowercase as appeared to have been passed in any tests I did. I have updated the PHP easiForm Element action to cover for this happening so your radio and checkbox elements are now being altered by the action as needed.

To get around the image as a submit button problem in Internet Explorer you will need to add a hidden field to your Freeway form page, give it a name of ‘submit’ with a value of ‘1’, now when your ‘image based submit button form’ is used in IE the name submit will have a value and so behave as expected. I will update the tut to let others using an image for a submit button aware of this workaround for IE.

Mike


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

You can also work this from the PHP side. If you submit an image-
button, then you will see two variables in the request, which are the
X and Y coordinates of the click on the surface of the image.

$_POST['buttonName_x'] and $_POST['buttonName_y'] will be part of
what your PHP script will get. So you can test for if(isset($_POST ['submit']) || isset($_POST['submit_x'])) ... and use that for your
form submission.

Walter

On Feb 2, 2008, at 7:04 AM, Mike B wrote:

Mark just to update the post on this…

The ‘PHP easiForm Element’ action reads the Freeway elements on
your form and in your Freeways case was reading the radio and
checkbox elements ‘tags’ as UPPERCASE and not lowercase as appeared
to have been passed in any tests I did. I have updated the PHP
easiForm Element action to cover for this happening so your radio
and checkbox elements are now being altered by the action as needed.

To get around the image as a submit button problem in Internet
Explorer you will need to add a hidden field to your Freeway form
page, give it a name of ‘submit’ with a value of ‘1’, now when your
‘image based submit button form’ is used in IE the name submit will
have a value and so behave as expected. I will update the tut to
let others using an image for a submit button aware of this
workaround for IE.

Mike


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

Walter,

I can’t help but feel for the action it would be much simpler just inserting a hidden field named ‘submit’ for the flag, $submit is used in both easiForm and easiCaptcha so it would mean adding code to the top of the form to not only check $_POST[‘submit’] but also $_POST[‘buttonName_x’] and then set $submit as per. This is simple enough of course but all can be solved simply with having the action insert a hidden field with a name of ‘submit’ if an image is used as the submit button.

I will be having a look at it and take it from there.

Thanks for the heads up.


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

Good idea. Just watch out for someone cleverly naming their graphical
button “submit”. The _x and _y parts are added by PHP, but the actual
button name is submit. And you can’t have two things named submit, or
else you will end up with the $_POST[‘submit’] being an array().

Test for any element with name=‘submit’ and then check its type. If
it’s an image, you will need to rename it inside your action or else
your very reasonable scheme will stumble on the PHP side.

Walter

On Feb 2, 2008, at 1:26 PM, Mike B wrote:

This is simple enough of course but all can be solved simply with
having the action insert a hidden field with a name of ‘submit’ if
an image is used as the submit button.


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

Mike has done a fantastic job in helping me with this issue, and my
problem was resolved perfectly. EasiForm action suite works a treat
now and many thanks to Mike for his support. Not to mention
FreewayTalk, thanks team.

Simon

Sent from my iPhone

On 2 Feb 2008, at 18:26, Mike B email@hidden wrote:

Walter,

I can’t help but feel for the action it would be much simpler just
inserting a hidden field named ‘submit’ for the flag, $submit is
used in both easiForm and easiCaptcha so it would mean adding code
to the top of the form to not only check $_POST[‘submit’] but also
$_POST[‘buttonName_x’] and then set $submit as per. This is simple
enough of course but all can be solved simply with having the action
insert a hidden field with a name of ‘submit’ if an image is used as
the submit button.

I will be having a look at it and take it from there.

Thanks for the heads up.


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

Walter,

To be honest I had the action actually do this (it names any image used for submit to ‘submit’), in tests this does not seem to be an issue when used with a hidden field with the same name, the PHP side seems to function as expected… but as you have mentioned this… I decided to change the submit image naming practice in the action if the user decides to use an image to submit the form with (Better safe than sorry!), at the same time the action will now insert a hidden field for submit when an image is used to submit the form with and so get around the issue with IE not passing an image name on.

Cheers

On 2 Feb. 2008, 5:33 pm, waltd wrote:

Good idea. Just watch out for someone cleverly naming their graphical
button “submit”. The _x and _y parts are added by PHP, but the actual
button name is submit. And you can’t have two things named submit, or
else you will end up with the $_POST[‘submit’] being an array().

Test for any element with name=‘submit’ and then check its type. If
it’s an image, you will need to rename it inside your action or else
your very reasonable scheme will stumble on the PHP side.

Walter


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