+ max_length = options.get('max_length')
+ if max_length:
+ self.fields['value'].validators.append(validators.MaxLengthValidator(int(max_length)))
+ self.fields['value'].label += u' (maks. %s znaków)' % max_length
+ if options.get('widget') == 'area':
+ self.fields['value'].widget = forms.Textarea(attrs={'cols': 80, 'rows': 25})