Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Form breaks when adding an attach document field


Go to End


8 Posts   3137 Views

Avatar
Mishy

Community Member, 24 Posts

21 September 2008 at 10:15pm

My form works fine when I don't have an attach document field. The form submits and gives the user a message after submission.

However, when I add an attach document field the form doesn't work.

Any ideas please.

Avatar
Willr

Forum Moderator, 5523 Posts

22 September 2008 at 8:54pm

Post your code to http://www.pastie.org/ or something and link to it from here. Quite a few things could be wrong, its hard to debug without seeing the code!

Avatar
Mishy

Community Member, 24 Posts

23 September 2008 at 5:40am

Ooooops! Forgot about that, sorry.

www.pastie.org doesn't work for some reason but you can view it at http://www.search4pharma.co.uk/contact/. :-)

Avatar
Willr

Forum Moderator, 5523 Posts

23 September 2008 at 4:02pm

ok well one of the errors is with Yorkshire & The Humber - in strict XHTML & needs to be a & thats why it doesnt work in Firefox. Well doesnt for me anyway

Avatar
Mishy

Community Member, 24 Posts

24 September 2008 at 12:39am

OK thanks willr. SS obviously doesn't convert it to an & as I built the form inside the CMS.

There still appears to be a problem with the attach document field but at least the form shows up in FF now - so thanks for that!

The other problem I have is that if there are no sub pages (i.e. links that appear in the sidebar if level2 links are present) under the Temporary page, then the Temp page won't validate in FF. The Temp page is an Article Holder page. I have tried changing the page type to a normal Page and that doesn't work either. So I think it has something to do with not having any level2 links present.

Link is http://www.search4pharma.co.uk/temporary/

Avatar
Mishy

Community Member, 24 Posts

25 September 2008 at 1:27am

Is anyone able to help me with these issues please?

Many thanks in advance
Michelle

Avatar
Liam

Community Member, 470 Posts

25 September 2008 at 2:46am

Well based on that outputted code, you're missing a closing <div> tag right before the body tag. If I insert one right before </body> it validates.

I'd guess the menu code is missing the closing div tag. I'd look around the menu 2 code for a closing div, might have to move it outside that regardless of if there are any sub pages or not.

Again, just guessing but I'd assume the missing closing tag is only being written to the page if there are sub pages.

Avatar
Mishy

Community Member, 24 Posts

25 September 2008 at 7:30am

Thanks LeeUmm. I found the only way I could fix it was to use a HomePage template for now until the agency has some sub-pages to add.

Any ideas about the attach doc field breaking my form on the Contact Page?
http://www.search4pharma.co.uk/contact/

In FF I get the following error:

Error
The website server has not been able to respond to your request.

In IE I get this error:
HTTP 500 Internal Server Error