Skip to content Skip to sidebar Skip to footer

Jquery Clone Validation Not Working For Html Drop Down

Working on clone in jQuery. With my current code original div getting cloned validation working fine for the original one and cloned one. These things are working with my code. In

Solution 1:

When you are cloning the elements, you do not clone the class .required_field. Which in your code only to that class, adds required: true part.

I Now figured out the problem definitely is in your cloning part.

if($(this).hasClass("required_field"))
{
   $(this).removeClass("required_field");
   $(this).addClass("cloned_field");
   //$(this).addClass("errRed");
}else{
   $(this).removeClass("errRed");
   $(this).removeClass("text-error-red");
}

You had if it has the class required_field, remove it. So i just deleted this line $(this).removeClass("required_field"); and when adding more education forms, it increased the unfilled count.

I just tested the same idea for the second cloning part. And that did the job. So this is the solution to the count.

Now your talking about the cloned div or radio button not working in your code, in the liveweave code, the drop downs works for me, tho I can't find any radio buttons.

Please try the answer I specified, and if any problems keep to exist, please update your question or leave a comment here.

Post a Comment for "Jquery Clone Validation Not Working For Html Drop Down"