import useSWR from "swr"; export function Textfield(props) { const { name, label } = props; return (
); } export function MultiLinefield(props) { const { name, label } = props; return (

Do not include personal or financial information, like your National Insurance number or credit card details.
); } export function DateField(props) { const { name, label } = props; return (
For example, 31 3 1980
); } export function YesNofield(props) { const { name, label } = props; return (
); } export function PickList(props) { const { name, label, datafieldname } = props; const fetcher = (url) => fetch(url).then((res) => res.json()); const { data, error } = useSWR("/api/lookups/" + datafieldname, fetcher); if (error) return (
); if (!data) return (
{props.label} loading...
); console.log(JSON.stringify(data.GlobalOptionSet.Options)); const dropdownObj = data.GlobalOptionSet.Options; return (
); } export function NumericField(props) { const { name, label } = props; return (
Must be between 6 and 8 digits long
); } export function DecimalField(props) { const { name, label } = props; return (
Must be between 6 and 8 digits long
); } export function ReadOnlyfield(props) { const { name, label } = props; return (
); }