Add Yes/No Validation

How can I add a Yes/No control that needs to be validated Yes before submitting?

Or just a checkbox that needs to be validated in order to submit a form (a declaration that needs to be checked).

Hi!

You just need to add validator. Add this code to your JavaScript Editor:

fd.validators.push({
    name: 'MyCustomValidator',
    error: "Must be Yes",
    validate: function(value) {
        if (!fd.field('Checkbox').value)
            return false;
        return true;
    }
});

‘Checkbox’ is an internal name of your Checkbox field. Notice that this code should be placed in ‘rendered()’ event handler.

Will give it a try. Much appreciated!