abunk47 / ITP140-Project

ITP-140 Final Project
0 stars 1 forks source link

Form Validation #2

Open ajohnson5013 opened 9 years ago

ajohnson5013 commented 9 years ago

I noticed that the form validation has died and is no longer doing anything. I thought the only problem was with the order form. I fixed a bracket issue with its script that should have solved the problem but apparently there is more to it. Also, the registration form is no longer validating the password field. I am looking into it. Let me know if you have any idea why.

abunk47 commented 9 years ago

Hi Aaron,

Ill check it tonight. It may be due to the plugins I added but Ill see as it seemed fine the other day. The only thing I had added for those forms was the auto fill in to the form for the states. Otherwise it should be fine. Thanks.

Best,

Andy On Dec 8, 2014 5:39 PM, "ajohnson5013" notifications@github.com wrote:

I noticed that the form validation has died and is no longer doing anything. I thought the only problem was with the order form. I fixed a bracket issue with its script that should have solved the problem but apparently there is more to it. Also, the registration form is no longer validating the password field. I am looking into it. Let me know if you have any idea why.

— Reply to this email directly or view it on GitHub https://github.com/abunk47/ITP140-Project/issues/2.

ajohnson5013 commented 9 years ago

Its probably me just messing up in writing it initially. I think I need to change what I put for class= in some fields and there may be a closing tag missing somewhere, at least on the registration form.

abunk47 commented 9 years ago

Hi Aaron,

I went through the order form code and fixed some of the code to make it a bit easier to read and added a couple element ID's that seemed to be missing (is this using the .validate jQuery plugin?). I also commented out the one for shipping because each of the shipping options has a different ID and I wasn't sure how to fix that. I finally got it to work somewhat but please check the code and confirm the validation fields are correct. You wouldn't believe it but the issue was that your plugin came before the Jquery scripts on the load sequence. I switched them and some of the validations ended up working (like for the credit card and email). So pull the latest Github version and see if it works for you now, if not let me know. I also included a commented out potential regex check for the zip code but I couldn't get it working so if you can feel free to do so. Also, any thoughts on how to improve the drag and drop screen for the games?

Thanks,

Andy

On Mon, Dec 8, 2014 at 6:32 PM, ajohnson5013 notifications@github.com wrote:

Its probably me just messing up in writing it initially. I think I need to change what I put for class= in some fields and there may be a closing tag missing somewhere, at least on the registration form.

— Reply to this email directly or view it on GitHub https://github.com/abunk47/ITP140-Project/issues/2#issuecomment-66208582 .

ajohnson5013 commented 9 years ago

Yeah I spent some time this morning going over it after my brain fried last night. What I had uses the validate plugin and it was mostly correct. I messed up like one name= and class= and was missing a closing tag on a div for the registration form. But those weren't the problem. It seems when I was playing around with other plugins I ended up putting the validation above the jquery one like you found out. So that is entirely why it wouldn't work when I checked it again later. Very annoying to track down because I kept glancing over it and just checking that it was there not the order it was in. The only thing I can think of for the drag and drop is that it should be made to reset after the button is clicked. Adding more to the box after clicking it once seems to cause multiple alerts to pop up. I'm going to take a look at the forms again now and see about what needs more validation like the zip you mentioned. I wonder whether the plugin conflicts with regex or any other form of validation?

abunk47 commented 9 years ago

I understand the brain being fried as trying to figure out the issue with the draggable boxes has hurt my head. So I did a couple things I think will help you and I out. I finally got the tooltip boxes working, and making it so we don't get weird popups or weird errors when reloading the images. The only issue is that when it reloads the images it does not keep the tooltips (not sure why and honestly I'm not going to worry about it). The issue was that jQuery was an old version so the plugin was not working correctly. On yours with the validate plugin it also seems to be working better with the new version of jQuery. All the fields seemed to validate when I hit submit (though maybe that's due to your changes as well?) and they may now work with the regex stuff, but you can see if that helped or not. I will look at the other issues tomm. night. Also, please check and see if any other issues popup with the draggable boxes now. Thanks!

On Tue, Dec 9, 2014 at 1:53 PM, ajohnson5013 notifications@github.com wrote:

Yeah I spent some time this morning going over it after my brain fried last night. What I had uses the validate plugin and it was mostly correct. I messed up like one name= and class= and was missing a closing tag on a div for the registration form. But those weren't the problem. It seems when I was playing around with other plugins I ended up putting the validation above the jquery one like you found out. So that is entirely why it wouldn't work when I checked it again later. Very annoying to track down because I kept glancing over it and just checking that it was there not the order it was in. The only thing I can think of for the drag and drop is that it should be made to reset after the button is clicked. Adding more to the box after clicking it once seems to cause multiple alerts to pop up. I'm going to take a look at the forms again now and see about what needs more validation like the zip you mentioned. I wonder whether the plugin conflicts with regex or any other f orm of v alidation?

— Reply to this email directly or view it on GitHub https://github.com/abunk47/ITP140-Project/issues/2#issuecomment-66335881 .