Download the PHP package perfectus/perform without Composer

On this page you can find all versions of the php package perfectus/perform. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package perform

PerForm plugin for Craft CMS 3.x

PerForm facilitates form handling for Craft developers. Process, test, store, send email notifications, configure client side validation, include powerful spam protection, and more.

Requirements

This plugin requires Craft CMS 3.0.18 or later.

Installation

To install the PerForm plugin, follow these instructions:

  1. Open your terminal and go to your Craft project:

    cd /path/to/project
  2. Then tell Composer to load the plugin:

    composer require perfectus/perform
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for PerForm.

PerForm works on Craft 3.x.

PerForm Usage Notes

Issues

Please report any issues you find to the PerForm Issues page.

PerForm Overview

PerForm is built for Craft CMS web developers with ultimate flexibility in mind. The goal is to let you build the web form front-end anyway you'd like while following a handful of simple conventions. After you include the web form in your Twig template, the plugin will assist you with the following:

Using PerForm

Using PerForm is quite simple. The following needs to be in place to get PerForm working properly.

  1. PerForm formTag — to make sure that the form will be submitted to and processed by PerForm
  2. Form built according to PerForm form fields conventions — to make sure that PerForm knows which fields need to be processed
  3. PerForm form settings — to let PerForm know how to process the form submission
  4. PerForm plugin settings — to configure additional options and connect PerForm with external services

Continue reading below to learn more about each concept. We're going to put together a simple form that collects First Name, Last Name and Email to illustrate how to build, setup and configure a form that will be processed by PerForm.

PerForm formTag

The formTag variable generates the opening <form> tag. The form will not be processed without it.

The formTag has one required configuration option entryId that specifies which entry contains the Form Settings for the form that will be included below. This will generate html code that looks something like this.

Note, that if you provide an incorrect entryId or have not setup the Form Settings associated with the provided entryId properly, you will see a message on the screen that looks like this.

PerForm form fields conventions

PerForm is not concerned with how you decide to build your form, that's totally up to you. While you're building your form, you need to keep one important convention in mind. You need to let PerForm know what are the field lables and values that whould be processed and stored.

In the example above, PerForm will process and store the field for First Name textbox. You need to let PerForm know what is the field label and what is the field value:

Note that in the example above, you can replace firstName with anything you'd like. In fact, you will need to provide a unique 'handle' for each field you want PerForm to process. Of course, you don't need to build the fields by hand (and you shouldn't). There are many ways to go about this, for example, you can use Twig Macros, Twig Includes or a combination of both.

PerForm form settings

PerForm comes with a Form Settings field type that allows you to add a field to an entry that will include your form. You will need to create a field and add it to the layout of your entry (actually, this can be any entry, not specifically the entry that will include the template to generate your form). You will specify which entry includes the form settings through the formTag variable.

Once you create the field and associate it with an entry layout, you can provide the appropriate settings for the particular form.

PerForm plugin settings

Example: Simple Contact Form

This example will introduce you to how the various concepts fit together and will ultimately allow you to build much larger and more complex forms.

The following template code:

With the following Form Settings:

And, without any styling, will generate a very simple form.

By default, PerForm will redirect the browser to the original url and set a flash message with the submissionId key (more details about redirecting and flash messages) which you can test for and display a "Thank You" message for the visitor. So, after filling out and submitting the form, the visitor will see this content in the browser:

The form submission will be processed by PerForm, saved in the Control Panel:

Where a user with the appropriate permissions can see the form submission detail:

And, the notification recipient receives the following email notification:

Redirecting after submit

By default, PerForm will automatically reload the current page.

To override this default behavior, include redirectInput function after the PerForm formTag and specify your redirect destination.

Sometimes it's convenient to retrieve and display the information included in the form submission on the 'thank you' page. You can achieve this by setting query string parameters (although, there is a much better way). The following variables can be used within the URL/path you set:

For example, if your form looks like this:

On your contact-form/thank-you.html template, you can access the parameters using the craft.app.request.getQueryParam():

Using flash messages

When a form submission is successfully processed, PerForm will set a flash message with the submissionId key and submission ID as value to indicate that the form submission was successful. In addition to checking whether the form was successfully processed, this also gives you the ability to retrieve the entire submission content using the getSubmissionById plugin variable. The advantage of using this method as opposed to sending the submissionId as a query parameter is two-fold. First, the actual submission ID cannot be easily extracted from the response, and second, it is no longer available when the page is refreshed (making this approach work very well when redirecting to the same template that includes the form itself).

Using the example from above:

On your contact-form/thank-you.html template, you can retrieve the submissionId from the session flash and use it to fetch the entire submission content using the getSubmissionById plugin variable (here is the list of all submission variables):

As you can see in the example above, if a flash with the submissionId key has not been set, PerForm could not process the form submission and it is likely that an error flash message was set instead.

Example: Full-featured Complex Form

Content is coming soon...

PerForm Widget

You can enable the PerForm dashboard widget to keep track of the various form submissions.

PerForm Utility

The handy PerForm utility allows you to easily delete all the Test Submissions from the Control Panel.

Control Panel Permissions

If you are using Craft CMS "Pro" edition, PerForm provides permissions that can be used to grant access to users based on their User Group. These are set in Settings → Users → User Groups.

Grant General Access to PerForm

With General Access to PerForm the users are able to:

Grant Utilities Access to PerForm

With Utilities Access to PerForm the users are able to:

PerForm Roadmap

Some things to do, and ideas for potential features:

Brought to you by Perfectus Digital Solutions


All versions of perform with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^3.0.18
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package perfectus/perform contains the following files

Loading the files please wait ....