Overview
This article discusses the process of installing and using the Contentful Conditional Fields feature, which allows for the creation of conditional fields on a JSON object field. The article provides a simple proof of concept (POC) using the Contentful React App starter kit.
Features
- Contentful Conditional Fields: Allows for the creation of conditional fields on a JSON object field.
- Field Parameters: Provides options for checkbox label text and image.
- Create Contentful App: Bootstraps the project with Create Contentful App.
Installation
- Clone the project repository.
- Navigate to the project directory.
- Run the command
npm startto create or update your app definition in Contentful and launch the app in development mode. - Open the app in the browser to view it. The page will automatically reload when you make edits, and any lint errors will be displayed in the console.
- To build the app for production, run the command
npm run build. This will create a build folder with the optimized and minified build. - Your app is now ready to be deployed.
Note: To make your app look and feel like Contentful, use the Forma 36 design system and Contentful Field Editors React components.
Summary
This article provides a guide on installing and using the Contentful Conditional Fields feature. It also explains the process of creating conditional fields on a JSON object field and provides a simple proof of concept using the Contentful React App starter kit. The article concludes with instructions on how to customize and deploy the app.