Skip to main content

Yes/No

  • Data type: boolean
  • JSON Schema data type: boolean

The boolean field lets users input true or false values. The default widget for this field is a checkbox widget.

Example

import React from "react";
import { createForm, booleanField, StatefulFormView } from "@fab4m/fab4m";
import "@fab4m/fab4m/css/basic/basic.css";

const form = createForm({
name: booleanField({
label: "I agree to the terms and conditions",
}),
});

export default function BooleanFieldExample() {
return <StatefulFormView form={form} hideSubmit={true} />;
}

Available Widgets