logo
Responsive Embeddable Extensible Form generator

What is Reef?

Reef is an open source PHP and Javascript library for dynamically creating forms. It features three different methods for building forms:

  • Reef provides an interactive drag & drop interface for letting your users create forms.
  • Additionally, Reef also ships with a chaining interface for building forms.
  • At its core, Reef uses form definitions for defining forms. Form definitions are nothing more or less than YAML files defining the form structure.

Why Reef?

There are many more form generators written in PHP, but almost all of them either are not embeddable (and hence require an additional website setup besides your main website), are not open source or seriously lack functionality. Reef is created to overcome these problems, providing a framework agnostic form generator that can freely be embedded into your own website, while also providing you the possibility to extend it with your own form components.

What does Reef provide?

Reef is aimed at those users who want to provide their users with the ability to build their own forms, and in turn present these forms to other users to fill them in. Reef can be used to create, save and modify forms, as well as render forms for display, process and save submitted form data, and display already filled in forms for modification. In an overview, these are Reef's features:

  • Form generator

    Let your users build forms using a drag and drop user interface, or build forms programmatically using a chaining interface

  • Form submission processing

    Use Reef to display the form and process and validate the form input data submitted by your users

  • Built-in form and submission storage

    Let Reef store your forms and submissions in your database using PDO. Of course, you can also process the data yourself

  • Submission migration

    Already have received submissions, but want to modify your form? Reef provides the possibility to add, edit and delete fields on the fly, warning you about any data loss that may occur in the process

  • Submission display and simple reporting

    You can generate HTML code for displaying submissions, and also generate a CSV file containing all submissions. Reef purposefully does not provide extensive reporting tools - this deserves the attention and devotion of an entirely separate piece of software

  • Multi-language support

    Present your forms in multiple locales

  • Multi-template support

    Reef uses the responsive Bootstrap 4 by default, but also provides support for integrating other CSS frameworks

  • Conditional fields

    Use user input to dynamically show or hide fields, enabling you to only ask those questions that are needed

  • Embeddable

    Integrate Reef seamlessly into your own website, where and when you want

  • Extensible

    Missing a form component, language or template? Find someone who made it for you, or create it yourself! For other missing functionality, extensions can be created

  • Framework agnostic

    Reef is not built upon any specific PHP framework. It does have a few dependencies, but these should not be an issue. The drag and drop interface does require the jQuery library

  • Open source

    Being available under the LGPL 3.0 license, it is the aim of the Reef project to provide a form generator for everyone, by everyone. Use it and help us improve it!

What does Reef not provide?

As much as we'd like, we cannot do everything. There are some audiences Reef is not in particular well-suited for:

  • Reef does require a reasonable amount of set-up. It is kind of plug-and-play, but you need multiple plugs to get Reef to work for you. If all you want is to generate one single form, the set up costs may be too much compared to programming a form yourself.
  • If you require a high level of customization or custom logic, Reef is not for you. It is intended to automate the repetitive creation of recurring simple forms, not the creation of very complex dynamic forms.

Setting up Reef

To integrate Reef into your own website, you'll need to do the following:

  • Define the Reef setup
  • Configure an entry point for internal communication between JavaScript and PHP
  • Integrate the builder: configure it, fetch its HTML, CSS & JS and include it on your webpage, and provide an entry point to POST the data to
  • Integrate the form: fetch its HTML, CSS & JS and include it on your webpage, and provide an entry point to POST the submission to

Of course, this is only to give you an idea of what you'll need to do. A more extensive explanation can be found in our integration guide.

You'll need to provide your own logic for deciding who may add, modify and delete forms and who may view, add, modify and delete form submissions. As use cases for forms vary a lot, we cannot do this for you!

After this, you'll probably also want to display the submissions somewhere, which can be done either by using the built-in (multiple) submission overviews or (single) submission views, or by fetching the data and displaying it yourself.