1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | Model:
class Placeholder(models.Model):
name=models.CharField()
description = models.CharField(blank=True, maxlength=200)
class Admin:
list_display = ('name', 'description')
js = (
'/appmedia/js/jquery.js',
'/appmedia/js/placeholder.js',
)
placeholder.js:
$(document).ready(function(){
$('#id_name').attr("disabled", true);
});
|
More like this
- Adding buttons to submit line in a Admin page by marinho 5 years ago
- Orderable inlines using drag and drop with jQuery UI by simon 4 years, 8 months ago
- Admin Input Field Character Count via jQuery by joshman 4 years, 5 months ago
- jQuery Double Click Edit ManyToMany in Admin by justhamade 3 years, 3 months ago
- Drag and drop ordering of admin list elements using jQuery UI by johj 2 years, 11 months ago
Comments
when the field is disabled,web form shows a error message of validation because the field is required. The field have a default value, but shows a error message validation, help me
#