forms icon indicating copy to clipboard operation
forms copied to clipboard

Evolve logic & UX | Rethink forms | become a must have asset to nextcloud core

Open DrDBanner opened this issue 4 months ago • 6 comments

Evolve Nextcloud Forms to SurveyJS class with a schema and logic core and a creator UX

Summary Forms is intentionally simple and works for quick polls. Many Nextcloud deployments (public sector, education, multi-section clubs, enterprises) need conditional logic, governance, and integrations. Without these, users build workarounds or move to external SaaS. A schema-first model with a small expression engine and a creator UI covers these needs while keeping existing simple use cases intact.

Target parity (functional, not 1:1)

  • Runtime: JSON schema with conditional visibility (visibleIf), computed values, answer piping, multi-page flow, dynamic or repeating groups, richer question types, i18n, accessible rendering.
  • Creator: drag-and-drop builder, property grid, live preview, theme editor. JSON round-trip identical to the runtime schema.
  • Events and integration: stable REST plus signed webhooks on submission. First-class bridges to Flow, Tables, Deck, and external systems.

Why this helps maintainers

  • Fewer one-off requests. An expression and visibility layer reduces long-tail “add setting X” tickets.
  • Clearer boundaries. Definition, renderer, and submission or storage are separated, which improves tests and avoids UI or business-logic leaks.
  • Easier contributions. A documented schema with a validator makes reviews contract based.
  • Lower support load. A consistent model with draft or publish, versioning, and audit removes many state mismatch bugs.

Minimal architectural changes (incremental, backward compatible)

  1. Add FDS v1 (Form Definition Schema) and a validator on server and build time.
  2. Add a small expression engine (JSON-Logic-like) for visibility, validation, and computed defaults.
  3. Implement a Creator that edits FDS v1 (drag-and-drop, property grid, live preview).
  4. Emit submission events as signed webhooks and document Flow recipes.
  5. Provide a v0 to v1 converter for existing simple forms. Keep legacy rendering read compatible during transition.

Acceptance criteria for P0

  • A form that uses conditional visibility, computed fields, and a repeating group renders correctly and validates on the server.
  • The Creator can build the same form with JSON round-trip parity.
  • Submissions trigger webhooks and work with Flow. The API remains stable.
  • WCAG-compliant rendering and an audit log for schema publishes and changes.

Ecosystem impact

If Forms reaches SurveyJS class, many organizations can stay on Nextcloud instead of paying for Typeform, SurveyMonkey, or Qualtrics. Data remains on premises and within GDPR. Total cost of ownership drops for public sector, education, NGOs, and clubs. Cross-app value increases: submissions can start Flow automations, create Deck cards, populate Tables or Collectives, notify in Talk, or land in Files with auditability. Hosting partners get a clear upsell for self-hosted enterprise forms. A stable schema and API invite third-party validators, widgets, and connectors. This moves Nextcloud from a files-plus-collaboration hub toward a process platform used daily for business-critical work.

DrDBanner avatar Aug 19 '25 10:08 DrDBanner

@DrDBanner thank you for your valueable input :) there are already a few feature requests like #357, #358 and #624 that cover parts of your proposal. But as you're going further than this, I'd like to keep it open for discussion.

Please keep in mind that this is a community driven app and not directly backed by the company Nextcloud. So if you can contribute to this app as a developer, we would like to welcome you in our team :) If not, it's not on our top priority list right now and I can't tell you if this will find its way into Forms anytime soon.

Chartman123 avatar Aug 19 '25 11:08 Chartman123

Thanks for the thoughtful reply, and for keeping Forms alive.

I fully understand that this is a community app. I appreciate the work that goes into it.

Forms could be a pillar for the whole platform if aimed a bit higher and more streamlined into bigger process integrations.

Two pieces fit well:

That combo turns Nextcloud from “files plus a few apps” into a workflow platform. Forms becomes the intake layer for many business processes. Project mapping becomes the backbone that ties Mail, Deck, Calendar, Tables, and Files into one working context. The result is daily active use across apps, not just storage. It is also the kind of anchor workload that attracts orgs to Nextcloud instead of relying on SaaS traps.

Why this matters for scale:

  • More retention: data stays in one place, processes run inside Nextcloud.
  • More cross-app activity: every form submission can create tasks, events, records, and files with traceability.
  • Clear story for public sector, education, clubs, and companies that need governance and audits.
  • A stable schema and events model others can extend with validators, widgets, and connectors.
  • A product path that hosting partners can sell and support.

This needs real engineering time. If product owners and core teams see the strategic value, maybe it unlocks more support from the company side.

Perhaps @provokateurin is able to shed some light on the matter?

DrDBanner avatar Aug 19 '25 12:08 DrDBanner

Not sure why I'm pinged here? I don't develop the Forms app 🤷‍♀️

provokateurin avatar Aug 19 '25 12:08 provokateurin

Not sure why I'm pinged here? I don't develop the Forms app 🤷‍♀️

Apologies for the tag. Goal is to get this cross-app vision in front of the right product-owner/leadership folks so it can be considered for resourcing. I just have too little insights in who does what.

DrDBanner avatar Aug 19 '25 12:08 DrDBanner

I think @nextcloud/designers would be a good place to start.

provokateurin avatar Aug 19 '25 12:08 provokateurin

Thank you for the detailed writeup! :) Some of the features you have mentioned definitely make sense such as conditional logic, multiple pages, and integrations with other Nextcloud apps and there are even already issues for that! so I would suggest to break this down into smaller issues that can picked up independently, while this can be kept open as an overview :)

nimishavijay avatar Aug 20 '25 11:08 nimishavijay