Post by jossoway » Sat Aug 06, 2011 2:41 am

Hi All,

I am writing an accessibility statement for a client website that will be using OpenCart.

Amongst all the usual information, I will be writing that the website uses the (superb!) OpenCart ecommerce platform, which relies on the web browser having Javascript enabled to function correctly.

I would like to then direct anyone who happens by the site with JS turned off (v.unlikely I know but you never know) to the contact form, so they can contact the store if they want to, but the form relies on JS too. I could stick an email address on there, but I feel that kind of defeats the object of having a contact form with captcha.

So, my question is this: Is there a way for me to make the contact form submit without JS?

Thanks!

John
:)

New member

Posts

Joined
Fri May 27, 2011 4:51 pm

Post by welfordmedia » Sat Aug 06, 2011 5:05 am

Hi John,
Yes. You will need to rewrite the contact form system though.

Although OC requires Javascript and functions like a bag of spanners rolling down a hill without it enabled, its only ex IT professionals from the mid 80's that still think Javascript is evil (or old ladies who still run AOL and Netscape browsers). Its 2011 and although we should be creating websites that function with or without it, I still think that visitors without it should be told politely to "go away" since they will only think sites are bad without the user experience Javascript offers, sorry for the rant..

Change:

Code: Select all

<a class="button" onclick="$('#contact').submit();"><span>Continue</span></a>
To:

Code: Select all

<input type="submit" name="submit" value="Continue" />
This will remove the JS part of the contact form..hope this helps...

An awesome Web Development company based in Leeds. E-Commerce Specialists by day, Geeks and Gamers by night

Tel: 0845 634 1838
Web: http://www.welfordmedia.co.uk
Twitter: https://twitter.com/welfordmedia
Facebook: https://www.facebook.com/welfordmedia


User avatar
Active Member

Posts

Joined
Thu Jul 21, 2011 5:59 pm
Location - Leeds, UK

Post by welfordmedia » Sat Aug 06, 2011 5:07 am

Sorry the file you edit is: /view/theme/YOUR_THEME/template/information/contact.tpl

An awesome Web Development company based in Leeds. E-Commerce Specialists by day, Geeks and Gamers by night

Tel: 0845 634 1838
Web: http://www.welfordmedia.co.uk
Twitter: https://twitter.com/welfordmedia
Facebook: https://www.facebook.com/welfordmedia


User avatar
Active Member

Posts

Joined
Thu Jul 21, 2011 5:59 pm
Location - Leeds, UK

Post by jossoway » Sat Aug 06, 2011 5:31 am

Hi,

Thanks for this - so it's just that one line I need to change?

No need to apologise for the rant. I can't really see it ever being an issue myself, but I have been asked to make sure in the event of someone wanting to contact my client via the website at least the contact form will work with JS disabled.

Thanks again for the help.

John
:)

New member

Posts

Joined
Fri May 27, 2011 4:51 pm

Post by SapporoGuy » Sat Aug 06, 2011 5:35 am

Turning off captcha will increase spam. However I do not suggest to list your email on the sit you'll get scraped and then will enjoy daily Viagra emails :(

Hmmm? How do you turn off js for your browser?

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by jossoway » Sat Aug 06, 2011 5:45 pm

Hi,

Just wanted to say thanks for the help - the contact form now works when JS is disabled. Which means in the unlikely scenario someone has it switched off they can at least email the store.

New member

Posts

Joined
Fri May 27, 2011 4:51 pm
Who is online

Users browsing this forum: Bing [Bot] and 61 guests