Represent an input text element of a form.
The set_attribute method should be overridden to check if the given key is in the list of accepted attributes.
Represent an input text element of a form.
The set_attribute method should be overridden to check if the given key is in the list of accepted attributes.
Create an input node. Default type is 'text'.
def __init__(self, parent, identifier):
"""Create an input node. Default type is 'text'. """
super(HTMLInputText, self).__init__(parent, identifier, 'input')
self.set_attribute('type', 'text')
self.set_attribute('id', identifier)
self.set_attribute('name', identifier)
Set input name attribute, and 'id' too.
def set_name(self, name):
"""Set input name attribute, and 'id' too.
:param name: (str)
"""
self.set_attribute('id', name)
self.set_attribute('name', name)