Skip to main content

new validation notifications

More
11 years 2 months ago #210572 by clet
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.3.6

hey guys,

i'm just looking to implement a more elegant solution for the registration form validation process.

The current alert window works but it's not the ideal, as the new browsers have that annoying check box to prevent future popups from happening. if you click on it, the form passes the validation check and continues even with missing fields...

so i was thinking on removing the alert window and using some other type of notification like little speech bubbles or tooltips on the forms itself.

My question is, there exactly it's the script that creates the alert windows so i can disable and implement a different approach to it.

cheers
dan

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #210606 by nicolas
Hi,

This is done in the hikashopCheckField function in the file media/com_hikashop/js/hikashop.js with the line:
Code:
alert(hikashopFieldsJs['validFieldsComp'][type][i]);
The following user(s) said Thank You: clet

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #210724 by clet
Replied by clet on topic new validation notifications

nicolas wrote: Hi,

This is done in the hikashopCheckField function in the file media/com_hikashop/js/hikashop.js with the line:

Code:
alert(hikashopFieldsJs['validFieldsComp'][type][i]);


Awesome Nicolas!

That works like a charm... check my screenshot...

however i'm wondering for some reason it check's the form from bottom to top so when you leave the form blank the first error is always the last one instead of being the first error from top to bottom...

is there a way to revert this order?

cheers,
dan

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #210759 by Jerome
Replied by Jerome on topic new validation notifications
Hi,

Nice !

For the checking order ; it's done by that line
Code:
for(var i = hikashopFieldsJs['reqFieldsComp'][type].length - 1; i >= 0; i--) {
You can replace it by
Code:
for(var i = 0; i < hikashopFieldsJs['reqFieldsComp'][type].length; i++) {
And I think that we will also replace it in our side.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: clet

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #210848 by clet
Replied by clet on topic new validation notifications
Thanks Jerome,

Works prefect!

Please Log in or Create an account to join the conversation.

Time to create page: 0.170 seconds
Powered by Kunena Forum