Forums

Form not Submitting when using plugin

PrimordiaMktg 16 Jan, 2012
Hey

As a preface, I have basic knowledge of php and the such, but making due with as I can. Thanks for any help in advance.

Working on a website contact form, basic form with only 5 fields that are sent to a DB. What I am trying to do is get the form to redirect to a thank you page after submission and saving the data to the DB. Everything works perfect if I view the field from the form manager screen and and view the front end view link. However, when I input the form into an article using the plugin text, the form simply refreshes and clears all data and no email goes out (which is the first action after submission), not DB save and no redirect. I cant figure why the plugin wont work, but if I link the form even directly to the URL is also works.

PS. When I submit the form when it is using the plugin, the url shows "contact-us?chronoform=ContactUs&event=submit" after the refresh.

Hope all this makes sense to someone...
GreyHead 16 Jan, 2012
Hi PrimordiaMktg,

Get this working first using the Frontend View link in the forms manager; then go on to test the plug-in.

It sounds as though you have the form redirecting to itself. What action/code are you using to do the redirection?

Bob
PrimordiaMktg 16 Jan, 2012
As of right now, the front end view works perfect.

Using the "User Redirection" to "/contact-us-thank-you".

EDIT: While working with it I added the debug event, and now the front end view now displays this after submission.

EDIT: Assigning the contact us form as a menu item and going to it from there it works as well. It really is only with the plugin where I am having an issues.

Notice: Undefined index: cfaction_handle_arrays_32 in public_html/components/com_chronoforms/libraries/chronoform.php on line 173

Notice: Trying to get property of non-object in public_html/components/com_chronoforms/libraries/chronoform.php on line 193
GreyHead 17 Jan, 2012
Hi PrimordiaMktg,

Please post a link to the article with the form so I can take a quick look.

Bob
GreyHead 18 Jan, 2012
Hi PrimordiaMktg,

There seems to be some kind of bug in the plug-in code for CFv4. Sometimes this can be fixed by setting Relative URL to No in the form General tab. I don't know if Max has a better fix for it but so far I haven't been able to see exactly what the problem is :-(

Bob
PrimordiaMktg 18 Jan, 2012
Tried giving the relative URL thing a shot. Didn't seem to fix it but I'll keep playing a few things. If you can think of anything else I would appreciate it, but that you so much for trying.
bgdesign 11 May, 2013
Similar issue here.

When I submit a form from http://arcflashwear.com.au/fire-rated-sock-order-quotation-or-enquiry-form

the form redisplays without the entered data and the url changes to:

http://arcflashwear.com.au/fire-rated-sock-order-quotation-or-enquiry-form?chronoform=FireRatedSockOrderForm&event=submit

If I use the frontend view to test the form outside the plugin it works fine:

http://arcflashwear.com.au/index.php?option=com_chronoforms&chronoform=FireRatedSockOrderForm

It is very frustrating as there are other forms created using the same process that work fine.

Any thoughts and especially solutions would be greatly appreciated as the client is not particularly happy with the present lack of functionality.
bgdesign 11 May, 2013
p.s.

The OnSubmit event is to:

1) email the form. The email is not being sent, and
2) redirect to http://arcflashwear.com.au/order-quotation-or-enquiry-form-thank-you

Now the other weird thing to note is that sometimes after submitting the form from the plug in and when it then goes to the http://arcflashwear.com.au/fire-rated-sock-order-quotation-or-enquiry-form?chronoform=FireRatedSockOrderForm&event=submit page, if you then refresh the page and click on the "Resubmit" button on the browser dialogue it will then work properly and perform (1) and (2) above. BUT not consistently.
GreyHead 12 May, 2013
Hi bgdesign,

Have you tries the Relative URl setting? See my post just before yours.

Bob

PS AntiMalWareBytes blocks the 118.139.171.1 IP address for your site, you might want to check that is it accessible.
bgdesign 14 May, 2013
Thanks Bob, that worked. I didn't quite get where that setting was at first reading, but once I had looked around a bit I found it.

Many thanks for your help. Will keep testing but initially all is good.

Kind regards,
Bob Green.
tomkat 23 May, 2013
Hi,

got the same issue (can't send form from the form in article, using plugin, j2.5.11, all CF the newest), but noticed as well that when form is under article with 'registered' permission, all works fine, when change to 'public' form stops to work. (with relative url set to yes)
And yes changing relative url from yes to no, that fix the issue with sending forms in articles on level 'public'. However, if possible to discover what is going on with this would be useful

Cheers
GreyHead 24 May, 2013
Hi tomkat,

I can't think of any obvious explanation for that change. If you look at the Page source, what is the action URL of the form in each case?

Bob
tomkat 27 May, 2013
Hi,

so firstly, what i discovered it's sth related rather to cache handling, as having cache off all works fine for both settings of the url. but, as i need to have cache on, problem exists.
so looking into source code, when relative url are set to 'no' is:

action=index.php?option=com_chronoforms&chronoform=formname&event=submit

when set to 'yes' is:

action=http://www.site.com/path/article-alias.html?chronoform=formname&event=submit

in this settings, all works fine for article under registered level, displaying thanks message under the article.
when article permission is set to public, form after submit just clears, and no any email sends

Cheers,
GreyHead 28 May, 2013
Hi tomkat,

You will have problems if you cache forms with security checks involved as they rely on a unique id being generated when the form is loaded - and clearly the cached copy will have a old id embedded :-(

Using ReCaptcha might avoid this, I'm not sure.

For the SEF problems there are two things that might help. One is to set Relative URL to No on the form General tab; the second to use the Joomla! ReDirect extension to make sure that the SEF URL points to the form URL correctly.

Bob
This topic is locked and no more replies can be posted.