How to return two inputs from custom form field
|July 22, 2014||Posted by forumadmin under TechQns||
I have Custom field:
class MyCustomField(forms.CharField): def __init__(self, *args, **kwargs): super(MyCustomField, self).__init__(*args, **kwargs) self.max_length = 10 self.set_label() def clean(self, value): value = super(forms.CharField, self).clean(value) [...] return value def set_label(self): self.label = 'custom label'
And I want to produce from this filed two inputs: text (to type by user) and hidden (with my data). How to do it?
|Asked By – Nips||Read Answers|