'Render a text input with given attributes
@param fieldname: the field name (for ID construction)
@param name: the name for the input field
@param value: the initial value for the input
@param label: the label for the input
@param hidden: render hidden
@return: a tuple (label, widget, id, hidden)'

def _input(self, fieldname, name, value, label, _type='text'):

    input_id = ('%s_%s' % (fieldname, name))
    _label = LABEL(('%s:    ' % label), _for=input_id)
    if isinstance(value, unicode):
        value = value.encode('utf-8')
    if (name in ('is_required', 'multiple')):
        widget = INPUT(_type=_type, _id=input_id, value=value)
    else:
        widget = INPUT(_type=_type, _id=input_id, _value=value)
    return (_label, widget, input_id)
