def _value(el):
    """
    Return the value of input element ``el``
    """
    if el.tag == 'textarea':
        return el.text
    try:
        return el.attrib['value']
    except KeyError:
        if el.tag == 'input' and el.attrib.get('type') == 'checkbox':
            return 'On'
        if el.tag == 'option':
            return el.text or ''
        return ''
