WhakerPy 0.8

https://sourceforge.net/projects/whakerpy/

Module whakerpy.htmlmaker

Class HTMLInputText

Description

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.

Constructor

Create an input node. Default type is 'text'.

Parameters
  • parent
  • identifier
View Source
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)

Public functions

set_name

Set input name attribute, and 'id' too.

Parameters
  • name: (str)
View Source
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)