new validation notifications

  • Posts: 11
  • Thank you received: 0
8 years 8 months ago #210572

-- 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.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
8 years 8 months ago #210606

Hi,

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

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

The following user(s) said Thank You: clet

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

  • Posts: 11
  • Thank you received: 0
8 years 8 months ago #210724

nicolas wrote: Hi,

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

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

Attachments:

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

  • Posts: 26004
  • Thank you received: 4004
  • MODERATOR
8 years 8 months ago #210759

Hi,

Nice !

For the checking order ; it's done by that line

for(var i = hikashopFieldsJs['reqFieldsComp'][type].length - 1; i >= 0; i--) {
You can replace it by
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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: clet

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

  • Posts: 11
  • Thank you received: 0
8 years 8 months ago #210848

Thanks Jerome,

Works prefect!

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

Time to create page: 0.063 seconds
Powered by Kunena Forum