'Turns checkbox option \'on\' or \'true\' to value_on (1)
any other value returns value_off (0)'

def checkbox_to_value(self, option, value_on=1, value_off=0):

    if isinstance(option, list):
        option = option[(-1)]
    if ((option == u'on') or (option == u'true')):
        return value_on
    return value_off
