Download the PHP package milkyway-multimedia/ss-zen-forms without Composer

On this page you can find all versions of the php package milkyway-multimedia/ss-zen-forms. 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 ss-zen-forms

Zen Forms

Still in heavy development

Due to some limitations, this may not work the way I want it, so the API will be changing frequently until I am happy with it. Please use with caution if you must use it at all.

Zen Forms is a module that allows changes on Silverstripe Forms and Validators using the decorator pattern. Name stolen from some other awesome Silverstripe Developers @sheadawson and @unclecheese

Decorator Pattern?

The decorator pattern works by wrapping other objects in with new methods, simply by passing them as the constructor. You can wrap as many decorators as you like around the same object. It is also great for separating some of your logic from your model, so model classes don't get cluttered.

An example of this within the Silverstripe Framework is the way the SS_ListDecorator works.

You could use this pattern in more than just a form. You could wrap DataObjects who only need temporary functionality that you can easily inject/change without changing the underlying model class.

Why not just use extensions?

Extensions are great, but sometimes not every Object will need that extension (for example, I wouldn't need a form within the CMS to use Twitter Bootstrap templates and functionality).

Decorators work on a per instance rather than on a per class basis, and sometimes that is what you really need.

If you prefer the extensions version, unclecheese offers the bootstrap-form extension by @unclecheese.

Why does this use zen validator?

The default Silverstripe validator does not support JS validation at this stage, so I use the zen validator by @sheadawson. I have included some constraints that work nicely with the FormFieldBootstrapper decorator.

Install

Add the following to your composer.json file

Usage

It is quite simple to use and easy to make your own. For example, if you would like a Form confirming to the Twitter Bootstrap layout scheme, you would do the following when defining your form:

You can also wrap as many as you need to:

Below are some of the decorators that come with the module. There is more documentation for each one in the docs/ folder

For Forms

  1. FormBoostrapper: Set your form to use the Twitter Bootstrap Template scheme. This has a lot of code from UncleCheese's module. If you use this, the field list is automatically decorated as well.
  2. ModaliseForm: Set your form to display in a Modal.

For Field Lists

  1. FieldListBootstrapper: Set your field list to use the Twitter Bootstrap Template scheme. This has a lot of code from UncleCheese's module. If you use this, the fields are automatically decorated as well.

For Fields

  1. FormFieldBoostrapper: Set your field to use the Twitter Bootstrap Template scheme. This has a lot of code from UncleCheese's module.
  2. CompositeFormFieldBootstrapper: If you are using a composite field with actions linked to one of its children fields, you will need to use this decorator. It is automatically used when necessary with the FormBootstrapper and FieldListBootstrapper.

To make your own, you can simply extend the specific Decorator, the BaseDecorator or implement \Milkyway\ZenForms\Contracts\Decorator.

Constraints

This module automatically pulls in the Silverstripe ZenValidator module, since it adds new constraints.

ConfirmedPasswordField

When you wrap the ConfirmedPasswordField, it allows you to use the password measure helper and password generator. It only works properly when wrapped with the FormFieldBootstrapper though, and you must include jquery.complexify.js in your scripts for it to work (it is not included with the module).

License

Version

Contact

Milkyway Multimedia


All versions of ss-zen-forms with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ~3.1
sheadawson/silverstripe-zenvalidator Version dev-master
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 milkyway-multimedia/ss-zen-forms contains the following files

Loading the files please wait ....