def radio(self, **kwds): from Input import Input control = Input(type="radio", **kwds) from FormField import FormField field = FormField(control) self.contents.append(field) return control
def text(self, required=False, **kwds): from Input import Input control = Input(**kwds) from FormField import FormField field = FormField(control, required) self.contents.append(field) return control
def selector(self, **kwds): from Selector import Selector control = Selector(**kwds) from FormField import FormField field = FormField(control) self.contents.append(field) return control
def checkbox(self, **kwds): from Checkbox import Checkbox control = Checkbox(**kwds) from FormField import FormField field = FormField(control) self.contents.append(field) return control
def button(self, **kwds): from Button import Button control = Button(**kwds) from FormField import FormField field = FormField(control) self.contents.append(field) return control
def textarea(self, required=False, **kwds): from TextArea import TextArea control = TextArea(**kwds) from FormField import FormField field = FormField(control, required) self.contents.append(field) return control
def register(self, name, state="ok", value=""): field = FormField(name, state, value) self._fields[name] = field return field
def field(self, **kwds): from FormField import FormField field = FormField(**kwds) self.contents.append(field) return field