def form_has_option(request, option_name, target_value):
    """Checks if the given option has a specific value. This is used for radio buttons and check boxes.

    Parameters
    ----------
    request: Request
        A Request object produced by the post of a form
    option_name: str
        String containing the name of the radio button group in the hedweb form
    target_value: str
        String containing the name of the selected radio button option

    Returns
    -------
    Bool
        True if the target radio button has been set and false otherwise
    """

    if option_name in request.form and request.form[option_name] == target_value:
        return True
    return False