Closed andrewjknox closed 12 years ago
I'm not sure if you had any problems or not, but the plugin does automatically remove all id's and disable all form elements inside of the clone panels... see line 136-137
Line 137 was the line I copied actually to remove name attributes.
Even though the clone form had everything disabled, on the server side, it was trying to read form fields with the same name, because two names were being posted. So one would have it's value empty, one would be populated, but because it was validating effectively the same form twice, once with valid data, and again with empty data, it failed.
It's kind of an edge case tbh, and probably only for peeps using ASP.NET for their website :)
So what did you do to fix it? I think I'll just include it as a just-in-case... something like this?
$(this).find('a,input,textarea,select,button,area').removeAttr('name').attr('disabled', 'disabled');
Aye, that's all I did, just remove the name attributes via .removeAttr('name')
Ok, I've just updated the plugin to v2.2.5 with the change above. Thanks again!
Hi there, Minor feature request really, I've added it into my own copy of your slider as I needed it and thought it might help someone else.
I've got an ASP.NET AJAX form in one of the panels that sit within a slider that's configured to infinity scroll.
That means it'll clone my form and therefore have two sets of forms fields with the same "name" attribute and therefore the values can come across as being empty and fail with validation when it all gets sent to the server ready for processing into a CMS.
What I did was, was to replicate what you do when you remove the "id" attributes from cloned elements, and do the same thing for the "name" attributes.
Cheers, Andrew