Custom form submission problem


(Scottk) #1

I'm a bit of a newbie at this, but have set up a custom form to collect a very small number of user details. The form works just fine when viewed through https, but will not submit via http.  I've checked that everything has been published, and checked permissions and all looks just fine, but may have even missed something in the site setup?

 

The form is embedded in a standard page, but the problem is the same when I just preview the form itself.  URL - www.playora.co.nz. The form's about 3/4 of the way down the page.

 

Any tips gratefully received!


(Nic Hubbard) #2

The form is embedded in a standard page, but the problem is the same when I just preview the form itself.  URL - www.playora.co.nz. The form's about 3/4 of the way down the page.

 

Yeah, that is the problem. You can't nest Custom Forms into a Standard Page as the caching will prevent the form from being submitted.

 

What you need to do is create a design customization with a nested content area, and set that area to not be cached. 


(Talk) #3

Hi Karen, the problem is that when the form is embedded and accessed via http, caching will be preventing it from behaving properly. There are a couple of ways to fix this, one: don't nest the form, two, force the form to submit to the page's URL with /_nocache - the second solution will require a little tinkering, so I recommend not nesting the form. Good luck!


(Nic Hubbard) #4

Hi Karen, the problem is that when the form is embedded and accessed via http, caching will be preventing it from behaving properly. There are a couple of ways to fix this, one: don't nest the form, two, force the form to submit to the page's URL with /_nocache - the second solution will require a little tinkering, so I recommend not nesting the form. Good luck!

 

Beat you. :)


(Talk) #5

 

Beat you. :)

Haha damnit!  :P


(Scottk) #6

Thanks for all that - but the form doesn't submit when it's not embedded, either! :) http://www.playora.co.nz/register-interest


(Ashish Karelia) #7

Thanks for all that - but the form doesn't submit when it's not embedded, either! :) http://www.playora.co.nz/register-interest

 

Tried it and it doesn't seem to be working like you suggested.

 

Have you added the %form_errors% keyword on the form's Page Content (you won't see this under the Bodycopy Folder of Form if you are not customising it. In that

case ignore this line of comment.)

 

Looks like the 2 questions on the form are mandatory, are there any additional rules to those questions?

 

You might wanna double check in the error.logs to see if Matrix is registering any errors there. 


(Scottk) #8

I haven't customised the form; it's pretty basic! Yes, there are two mandatory fields and these have no other rules - just fill them in.  At the moment, I'm more worried about the lack of submission than the error messages not displaying.  

 

I tried setting another form up from scratch and this also will only submit when I'm logged in so I am wondering if I've missed something while setting up the site itself?  (sorry - haven't been doing this for long & our primary site was set up by Squiz).   I've had no issue with forms on the site that Squiz set up for us.


(Ashish Karelia) #9

If you are having problem with submission by public user and not by logged in user then the issue is most likely cache as suggested in previous post. Can you try to exclude form assets from caching and give it go using a Public User.


(Scottk) #10

OK - have tried setting the default expiry and the browser cache expiry to zero, both for custom form rather than just form, to zero; no joy :( Is there anything in the site settings that I need to look at? Thanks so much for your help.


(Ashish Karelia) #11

I am a bit stumped if that didn't work. 

 

I'd let anyone else on the forums to see if they have any idea as to what might be going on. Other thing that comes in mind is turning off caching OFF completely for testing to see if it work. If it does then we can be certain it is something related to caching and not anything else.

 

Apart from that if you are still a Squiz Client then I'd suggest raising a support ticket with Squiz NZ and they should be able to help you out.

 

Ash


(Scottk) #12

Thanks Ash - glad to hear I'm not the only one who is bamboozled.  We are indeed Squiz clients; this will be the first time I have to admit defeat and ask for assistance :)


(Talk) #13

Hi Karen, you could try testing further by adding a script to the form's parent page that modifies the action by adding /_nocache, like (assuming you've got jquery plugged in):

<script>
$(document).ready(function() {
    $('#form_id').get(0).setAttribute('action', '%globals_asset_url%/_nocache?');
});
</script>

(Robin Shi) #14

did you set 'cache status' to 'no'? also check the error log or system log to see what happened.


(Palitsyn) #15

I am having the exact same problem. Squid seems to be caching the thank you or confirmation bodycopies. Turning cache off is out of question. I can use js to append the action url to include some sort of query string, but the issue will still exist for users with js disabled. It would be good if there were an option to add a query string on the end of a form action URL.