Download the PHP package angellco/fffields without Composer

On this page you can find all versions of the php package angellco/fffields. 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 fffields

FFFields

Fabulous front-end fields for Craft to help you create front-end forms and dashboards.


Note: The license fee for this plugin is $59 via the Craft Plugin Store.

Requirements

This plugin requires Craft CMS 3.1.0 or later.

Installation

To install the 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 angellco/fffields
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for FFFields.

You can also install FFFields via the Plugin Store in your Craft control panel, look for the “Plugin store” link in the main navigation and then search “FFFields”.

FFFields Overview

FFFields gives you a complete toolkit to create fabulous front-end forms and dashboards. You can hook up your fields to Craft via the CraftQL plugin or roll your own solution.

This plugin makes use of Vue.js and Tailwind CSS, but you don’t need to know either to use it.

Here is an example form that allows users to submit job postings:

FFFields uses the fields you have already defined in Craft and handles the validation requirements you have set too.

Currently supported field types

Configuring FFFields

There is no configuration to get FFFields working on its own, but if you want to tie in with CraftQL then you need to do a few extra things.

  1. Install the CraftQL plugin and setup up your endpoint and a token in the settings page.

  2. Next, add the following environment variables to your .env file:

    FFF_GQL_ENDPOINT="https://my-craft-site.com/api"
    FFF_GQL_TOKEN="<token-from-craftql>"
  3. And finally, make sure to wrap your fields in the {{ craft.fffields.formStart() }} and {{ craft.fffields.formEnd() }} tags as detailed in the usage section.

Using FFFields

To get started, output the following tag near the bottom of your page:

This will include the various CSS and JS that is needed to run things.

If you don’t want to include the CSS, perhaps because you want to make your own Tailwind theme, then you can pass in false like so:

Rendering fields

To render a field use the following method:

This method accepts a bunch of parameters as follows:

  1. handle: this is required and should be a string
  2. Options:
    1. value: optional, defaults to null
    2. element: optional, if used it should be set to a valid Element and will override any value also set, defaults to null
    3. required: optional, boolean, defaults to false

There is also another similar method for outputting special fields such as the title:

The handle for this method should be one of the following supported list:

Wrapping in a form

If you plan on using CraftQL to handle the form submissions then you can wrap your fields in the following two tags:

The parameters for the formStart() method can be configured as follows:

  1. mutation: required. Set this to the GraphQL mutation you want to use, e.g. upsertJobs.
  2. Options:
    1. enabled: optional, defaults to true. Set this to false if you want to submit a disabled element.
    2. redirect: optional, defualts to null. Set this to the path you want the user to be redirected to after a successful submission. Token substituion is supported so /jobs/edit/{id} would replace {id} with the ID value that is returned after submission. Currently supported tokens are {id}, {slug} and {url}.
    3. elementId: optional, defualts to null. Set this to the ID of the element you want to edit.
    4. submitText: optional, defaults to 'Save'. Use this to customise the submit button text.
    5. submittingText: optional, defaults to 'Saving …'. Use this to customise the disabled submit button text that is shown whilst the form data is sent.

FFFields Roadmap

General

Special attributes

Field types

Support specific forms

These will need testing once the various special attributes for each form are added and then a full example for each can be documented.


Brought to you by Angell & Co

Big thanks to the following people and projects:


All versions of fffields with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^3.1.0
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 angellco/fffields contains the following files

Loading the files please wait ....