def METHOD_NAME(self, val, var=None):
    r"""Sets an experimental variable.
    Parameters
    ----------
    val : str, unicode
        A value.
    var : str, unicode, NoneType, optional
        A variable name, or `None` to use widget default.
    """
    if var is None:
        var = self.var
    if var is None:
        return
    # Set the response variable
    l_val = []
    # When this function is called via the constructor, the checkbox is not
    # yet part of the form. Therefore, we need to add it explicitly to the
    # widget list.
    widget_list = self.form.widgets[:]
    if self not in self.form.widgets:
        widget_list += [self]
    for widget in widget_list:
        # Only consider checkbox widgets that use the same variable as
        # the current checkbox
        if (
                widget is None or
                widget.type != u'checkbox' or
                widget.var != self.var
        ):
            continue
        if widget.group != self.group and self.group is not None:
            raise InvalidFormScript('All checkbox widgets without a '
                                    'group or within the same group '
                                    'should have the same variable.')
        # Ignore the checkbox if it isn't checked
        if not widget.checked and widget.checked != u'yes':
            continue
        # The variable is normally the text on the checkbox. However, if
        # no text has been specified, then we use checkbox1, etc. as text
        text = safe_decode(widget.text).strip()
        if not text:
            text = 'checkbox{}'.format(widget_list.index(widget))
        l_val.append(text)
    val = u';'.join(l_val)
    if val == u'':
        val = u'no'
    Button.METHOD_NAME(self, val, var=var)