Skip to content
PRP.dev
ES— Leer esta página en español
Demos

Live demo

Dynamic form

A quality form described in JSON and rendered by a recursive React component. Answer it and watch nested fields appear and the score change; then edit the JSON and the form updates without reloading.

Sample company · Customer retention

Quality review — Phone support

Did the agent use the official greeting?−10 pts
Did the agent verify the customer's identity?Critical
Did the agent offer a solution to the issue?−25 pts

Illustrative form. In the real system the official score was calculated on the backend; this is a preview.

Edit the form (JSON)

Changes apply as you type, as long as the JSON is valid. Field types: si-no (yes/no), seleccion (select), checkbox and texto (text). Try adding a fourth level inside "hijos".

Valid JSON: the form is up to date.

How it works

  1. 1The form is a JSON tree: each field has a type, the condition for showing its children, a weight and whether it is critical.
  2. 2A component registry maps each field type to its React component, replacing what Blade used to do on the server.
  3. 3A recursive component renders each field and, if the answer meets the condition, calls itself with the children: any depth with no code changes (the demo allows up to 5 levels).
  4. 4The score deducts failed regular items and drops to 0 if a critical item fails; hidden fields don't count. Zod validates the JSON before applying it.