@Django中国社区
Thanks, this really helps. And actually I use another way to make the TextField readonly by setting the 'readonly' attribute in init() function:
def init(self, *args, kwargs):
super(forms.Form, self).__init__(*args,kwargs)
self.fields['user_id'].widget.attrs['readonly'] = True
self.fields['user_name'].widget.attrs['readonly'] = True
self.fields['email'].widget.attrs['readonly'] = True