Form field likhar somoy proyojoniyo argument-11
class Students(forms.Form):
name=forms.CharField() -->?
email=forms.EmailField() -->? Ai er vitore onek argument daoua jai proyojon onujaiye
phone=forms.IntegerField()-->?
# for hidden field
key=forms.CharField(widget=forms.HiddenInput())-->?
1.sobgular moddhe required = True default hoye thake amra chaile oita false likhte pari required sore jab html thake
2.name=forms.CharField( label="modi") aivabe labl argument diye label change korte pari "name" arbodole "modi" show korbe
3.name=forms.CharField( label_suffix='-') label ar field er majhe colon soriye onno kichu deta use hoi
4.name=forms.CharField( initial='munna') field er moddhe age thake name show korte use hoi
5.name=forms.CharField( disabled=True) kono field disabled korte use hoi
6.name=forms.CharField(widget=forms.PasswordInput()) amon dela password er motp **** amon neba
7.name=forms.CharField(widget=forms.Textarea) aita dela text areaneba
8.name=forms.CharField(widget=forms.FileInput) amon dela file input neba
###
9.name=forms.CharField(widget=forms.TextInput(attrs={'class':'css'})) kono field a class add korbe
pore css lagate use korbo
BOOTSTRAP o lagate parbo aikhan thake
10.name=forms.CharField(widget=forms.TextInput(attrs={'class':'css','id':'something'})) class er sathe id deta use korbo.
Comments
Post a Comment