Download the PHP package bigfork/silverstripe-formtacular without Composer

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

⚠️ This is alpha software, APIs may change ⚠️

Silverstripe Formtacular

A work-in-progress attempt at replacing/combining the functionalities of display-logic and zenvalidator, with the goal of removing the jQuery and jQuery Entwine dependencies.

Done

Todo

Required CSS

No frontend CSS is provided for this, because it's pretty simple for 99% of usecases and loading it from a separate CSS file seems wasteful when it's so easy to add to an existing project:

If you conditionally show/hide other elements, e.g. HeaderField, you may need to expand the selector list. Try to avoid using the .formtacular-hidden class selector alone (i.e. without an element), as this class will be added to both the field holder div and the form field itself by Silverstripe, so your fields may end up always invisible!

Quick example

Switching from display-logic

AJAX forms

Depending on how you handle AJAX forms, you may need to re-initialise the JavaScript after submission. As every approach is different, you will need to implement your own logic for re-initialising the form if/when HTML is modified. For example a popular way of handling AJAX form submissions is to replace the entire form HTML with the response from the server; so your form handler could do something like:

An alternative “global” way of handling this is to use a MutationObserver to detect when any form is added to or removed from the document:

Customisation

If you need to change how field values are fetched or how events are bound, like if you’re using a JavaScript library to decorate form fields, you can do so by overriding global functions registered against window. For example in the CMS bundle for this module, as jQuery is available we utilise it to fetch field values:

Check out the source JavaScript in client/src/js/rules and client/src/js/utils directories for a full list of functions that can be overridden and when you might wish to do so.

Adding checks/rules

You can write your own checks by extending Bigfork\SilverstripeFormtacular\Rules\AbstractRule, registering it in YAML and writing an accompanying JavaScript function:


All versions of silverstripe-formtacular with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ^4.12|^5
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 bigfork/silverstripe-formtacular contains the following files

Loading the files please wait ....