[Pro] PHP Feedback Form, Validate and another form

Hi all,

I have an updated site (Freeway 6 Pro, HTML5, but not yet live, although the original site is there), that has a form in the top panel which is a quick search for product by product number from the MySQL database that is used to serve the products onto the pages.

On the Contact Us page there is a contact form that uses PHP Feedback form and the Validate/Validate Extras to check that there is content in the fields.

When the page is published, the Validate action throws up a javascript error, “tag has no properties” with the error pointing to the line:


form=tag.fwFindEnclosing("form");

If I delete the quick search box, then the Validate works.

The quick search has a small bit of javascript added to it to check that something is in the text box, and to put the cursor focus into the search box. Even without the extra javascript the Validate action still throws a wobbly!

I have built the page up from nothing but as soon as the quick search form is on the page, Validate falls over.

Is there a way I can get both of the forms working on one page?

The url is of the page without the Validation. Any errors on the contact form takes you to the error page from which you can go back to the form to fill in the missing bits.

Any thoughts…

Steve.

http://www.cotswoldengineeringsupplies.co.uk/2013-revised/Contact/index.php


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

Take a look at the Multiple Forms Action suite. This allows you to have multiple forms on the same page without accidentally nesting one inside another (which of course is illegal).

Walter

On May 19, 2014, at 6:03 AM, SteveB wrote:

Hi all,

I have an updated site (Freeway 6 Pro, HTML5, but not yet live, although the original site is there), that has a form in the top panel which is a quick search for product by product number from the MySQL database that is used to serve the products onto the pages.

On the Contact Us page there is a contact form that uses PHP Feedback form and the Validate/Validate Extras to check that there is content in the fields.

When the page is published, the Validate action throws up a javascript error, “tag has no properties” with the error pointing to the line:


form=tag.fwFindEnclosing("form");

If I delete the quick search box, then the Validate works.

The quick search has a small bit of javascript added to it to check that something is in the text box, and to put the cursor focus into the search box. Even without the extra javascript the Validate action still throws a wobbly!

I have built the page up from nothing but as soon as the quick search form is on the page, Validate falls over.

Is there a way I can get both of the forms working on one page?

The url is of the page without the Validation. Any errors on the contact form takes you to the error page from which you can go back to the form to fill in the missing bits.

Any thoughts…

Steve.

http://www.cotswoldengineeringsupplies.co.uk/2013-revised/Contact/index.php


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

Hi Walter,

Thanks for the info, I have already tried the Multiple Forms Action on them both, but that doesn’t seem to work.

I’ve set the Action on the contact form to the one that the PHP Feedback Form creates, in this case index-go.php, is that correct.

The quick search form Action is set to the page that displays the results. (…/Product-Search/quicksearchresults.php)

The actual Contact form is in the middle of an inflow box.

I have tried this on a new document without any other bits and as soon as there are 2 forms the validate action fall over.

Am I doing something wrong or is it a bug in the javascript?

The error this time is:

if (!form.name)
{….

which is a couple of lines down from the previous error.

Both of the Forms have names, so I’m a bit at a loss as to why this is happening…

I can’t see the result of the output from the page because the error stops the page from publishing.

Any more thoughts…

Cheers,

Steve.

On 19 May 2014, 10:39 am, waltd wrote:

Take a look at the Multiple Forms Action suite. This allows you to have multiple forms on the same page without accidentally nesting one inside another (which of course is illegal).

Walter


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

The error that you quoted initially is within one of the Actions, not the published JavaScript in the finished page. You may need to step back and use the No Form Action (from the Multiple Forms Suite) on the page, then create the wrapper form elements using the TagWrap Action and hand-code. http://actionsforge.com/actions/tagwrap You will need to know the endpoint of the forms, but you appear to have that well in hand. Just make sure you add the method as appropriate (get or post). The Action will work on inline elements as well as drawn elements, so you should be able to sneak a and around each of these elements.

As long as you don’t end up with a form within a form, as I warned you earlier, this should work.

Walter

On May 19, 2014, at 9:22 AM, SteveB wrote:

Hi Walter,

Thanks for the info, I have already tried the Multiple Forms Action on them both, but that doesn’t seem to work.

I’ve set the Action on the contact form to the one that the PHP Feedback Form creates, in this case index-go.php, is that correct.

The quick search form Action is set to the page that displays the results. (…/Product-Search/quicksearchresults.php)

The actual Contact form is in the middle of an inflow box.

I have tried this on a new document without any other bits and as soon as there are 2 forms the validate action fall over.

Am I doing something wrong or is it a bug in the javascript?

The error this time is:

if (!form.name)
{….

which is a couple of lines down from the previous error.

Both of the Forms have names, so I’m a bit at a loss as to why this is happening…

I can’t see the result of the output from the page because the error stops the page from publishing.

Any more thoughts…

Cheers,

Steve.

On 19 May 2014, 10:39 am, waltd wrote:

Take a look at the Multiple Forms Action suite. This allows you to have multiple forms on the same page without accidentally nesting one inside another (which of course is illegal).

Walter


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

Hi Walter,

I’ll give that a try.

Just out of interest, does it matter which order the actions on the page are loaded. I know some Actions can stop others from doing their stuff if they get loaded in the wrong order. But if you have the PHP Feedback Form loading before the No Form Action, would that make any difference.

The validate Action adds extra javascript to each of the elements it validates, if the form doesn’t validate, i.e. it throws a wobbly, think it might be an idea to put that bit in by hand and have the form as a markup item. At least then I know it will be correct!

On to the hand coding of the forms…

Thanks for the help.

Steve.

On 19 May 2014, 1:44 pm, waltd wrote:

The error that you quoted initially is within one of the Actions, not the published JavaScript in the finished page. You may need to step back and use the No Form Action (from the Multiple Forms Suite) on the page, then create the wrapper form elements using the TagWrap Action and hand-code. http://actionsforge.com/actions/tagwrap You will need to know the endpoint of the forms, but you appear to have that well in hand. Just make sure you add the method as appropriate (get or post). The Action will work on inline elements as well as drawn elements, so you should be able to sneak a around each of these elements.

As long as you don’t end up with a form within a form, as I warned you earlier, this should work.

Walter

On May 19, 2014, at 9:22 AM, SteveB wrote:

Hi Walter,

Thanks for the info, I have already tried the Multiple Forms Action on them both, but that doesn’t seem to work.

I’ve set the Action on the contact form to the one that the PHP Feedback Form creates, in this case index-go.php, is that correct.

The quick search form Action is set to the page that displays the results. (…/Product-Search/quicksearchresults.php)

The actual Contact form is in the middle of an inflow box.

I have tried this on a new document without any other bits and as soon as there are 2 forms the validate action fall over.

Am I doing something wrong or is it a bug in the javascript?

The error this time is:

if (!form.name)
{….

which is a couple of lines down from the previous error.

Both of the Forms have names, so I’m a bit at a loss as to why this is happening…

I can’t see the result of the output from the page because the error stops the page from publishing.

Any more thoughts…

Cheers,

Steve.

On 19 May 2014, 10:39 am, waltd wrote:

Take a look at the Multiple Forms Action suite. This allows you to have multiple forms on the same page without accidentally nesting one inside another (which of course is illegal).

Walter


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

I know from experience that No Form and PHPFF will work together, whether the PHPFF is added to the form container (usually a table) or to the page itself.

Walter

On May 19, 2014, at 5:51 PM, SteveB wrote:

Hi Walter,

I’ll give that a try.

Just out of interest, does it matter which order the actions on the page are loaded. I know some Actions can stop others from doing their stuff if they get loaded in the wrong order. But if you have the PHP Feedback Form loading before the No Form Action, would that make any difference.

The validate Action adds extra javascript to each of the elements it validates, if the form doesn’t validate, i.e. it throws a wobbly, think it might be an idea to put that bit in by hand and have the form as a markup item. At least then I know it will be correct!

On to the hand coding of the forms…

Thanks for the help.

Steve.

On 19 May 2014, 1:44 pm, waltd wrote:

The error that you quoted initially is within one of the Actions, not the published JavaScript in the finished page. You may need to step back and use the No Form Action (from the Multiple Forms Suite) on the page, then create the wrapper form elements using the TagWrap Action and hand-code. http://actionsforge.com/actions/tagwrap You will need to know the endpoint of the forms, but you appear to have that well in hand. Just make sure you add the method as appropriate (get or post). The Action will work on inline elements as well as drawn elements, so you should be able to sneak a around each of these elements.

As long as you don’t end up with a form within a form, as I warned you earlier, this should work.

Walter

On May 19, 2014, at 9:22 AM, SteveB wrote:

Hi Walter,

Thanks for the info, I have already tried the Multiple Forms Action on them both, but that doesn’t seem to work.

I’ve set the Action on the contact form to the one that the PHP Feedback Form creates, in this case index-go.php, is that correct.

The quick search form Action is set to the page that displays the results. (…/Product-Search/quicksearchresults.php)

The actual Contact form is in the middle of an inflow box.

I have tried this on a new document without any other bits and as soon as there are 2 forms the validate action fall over.

Am I doing something wrong or is it a bug in the javascript?

The error this time is:

if (!form.name)
{

.


which is a couple of lines down from the previous error.

Both of the Forms have names, so I'm a bit at a loss as to why this is happening

I can’t see the result of the output from the page because the error stops the page from publishing.

Any more thoughts

Cheers,

Steve.

On 19 May 2014, 10:39 am, waltd wrote:

Take a look at the Multiple Forms Action suite. This allows you to have multiple forms on the same page without accidentally nesting one inside another (which of course is illegal).

Walter


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