
Conditionally show or hide fields in your DatoCMS record forms based on the selected value of a dropdown field. Ships with a visual rule editor — no raw JSON required.
> Fork notice: This plugin is based on the original datocms-plugin-dropdown-conditional-fields by John DeWyze. It has been rewritten from scratch for the modern DatoCMS Plugin SDK (v2), migrated from Webpack to Vite, converted to React + TypeScript, and extended with a visual configuration UI. Thank you, John, for the original idea and implementation!
In your DatoCMS model, create a Single-line string field (e.g. category).
Under Presentation, set the editor to "Select input" and add your dropdown options (e.g. Blog, Product, Event).
Install from the DatoCMS Marketplace or add it as a private plugin under Settings > Plugins.
Open the trigger field settings and go to the Presentation tab. Under Field Add-ons, click "Add" and select "Dropdown Conditional Fields".
After adding the addon, a visual rule editor will appear:

Example: If your dropdown has values Blog, Product, and Event:
| Dropdown Value | Visible Fields |
|---|---|
blog | author, content |
product | price, availability |
event | date, location |
Fields not assigned to the currently selected value will be hidden automatically.
In the plugin settings, you can enable Debug Mode to log visibility changes to the browser console — helpful during setup.
npm installnpm run devThe dev server starts at http://localhost:5175/. Enter this URL as the plugin Entry point URL in DatoCMS.
| Command | Description |
|---|---|
npm run dev | Start Vite dev server |
npm run build | Type-check and build |
npm run preview | Preview production build |
npm run lint | Lint with ESLint |
npm test | Run unit tests (Vitest) |
npm run test:watch | Run tests in watch mode |
Build for production:
npm run buildThen publish to npm:
npm publishThe plugin will appear in the DatoCMS Marketplace within one hour.
Alternatively, deploy the dist/ folder to any static hosting provider and use the URL as a private plugin entry point.
ISC