remove form label and element
Hello!
I have form with many elements. I want remove with JQuery only checkbox and his label "remove the current file" :
Here bad form:
<form name="sf_method">
<input type="file" name="product_category[image]" value="822db2.jpg" id="product_category_image" />
<br />
<input type="checkbox" name="product_category[image_delete]" id="product_category_image_delete" />
<label for="product_category_image_delete">remove the current file</label>
</form>
Here what I want to get (only file input element):
<form name="sf_method">
<input type="file" name="product_category[image]" value="822db2.jpg" id="product_category_image" />
</form>
But there is still a problem. I have many files generated with different names checkbox, for example:
<input type="checkbox" name="product_image[image_name_delete]" id="product_image_image_name_delete" />
<label for="product_image_image_name_delete">remove the current file</label>
How to make a universal script to delete checkbox and his label?
Thanx!