Skip to main content

Usage

Once you have @flowable/forms-native and its dependencies installed, you can start using it in your project.

Example:

...
import { Form } from '@flowable/forms-native';

const formConfig = {
rows: [
{
cols: [
{
type: 'text',
label: 'name',
value: '{{name}}',
isRequired: true,
},
],
},
],
outcomes: [
{
label: 'save',
value: 'save',
enabled: '{{$formValid}}',
},
],
};

export function NativeForm() {
return (
<View>
<Form
config={formConfig}
onOutcomePressed={(payload, type) =>
console.log(
`type: ${type} | payload: ${JSON.stringify(payload)}`
)}
/>
</View>
);
}