Download the PHP package safan-form/form-manager without Composer

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

Form Manager

Form Manager for managing and building forms in Safan Framework.

REQUIREMENTS

PHP > 5.4.0

INSTALLATION

If you're using Composer for your project's dependencies, add the following to your "composer.json":

Update Modules Config List - safan-framework-standard/application/Settings/modules.config.php

Add Configuration - safan-framework-standard/application/Settings/main.config.php

USAGES

The FormManager initialized in Safan Handler by name 'formManager' , to use this class , call e.g.

To declare the type of form , you can use...

To use FormManager first you need to declare a Class in namespace 'Form' in your Module which wil extend FormType Class this is the class which contain form credentials. FormType is default class which namespace is FormManager/Type/FormType. e.g.

Your FormType Class have to declare two abstract methods --- 'buildForm()' and 'getName()'. first method - 'buildForm()' has dependency of FormBuilder $builder which builds forms fields . second method - 'getName()' returns the name of form which you can get in Form Class.

For any type of vield you can declare 'validation' which will be validated in initialization in FormValidation Class. Now are supported 'min', 'max' and 'callback' validations , but you can add your custom types extending Vaidation Class and declaring your custom methods in that Class.

'callback' must return boolean type. There ara default 'messages' for types 'min' and 'max', but you can declare custom messages adding 'message' type in 'validation' array.

VIEW

To build form in view you can use ... (e.g. in example we use bootstrap classes to build form in bootstrap view, but you can use your native classes or another framework for frontend view)

Every field is declared using this field's name which you declare in buildForm method of your Form Class.

The errors part is working if you verify the data after submitting form in your controller. e.g. to verify form

If there are errors the error messages will be shown on bottom of every field for which you have declared validations.


All versions of form-manager with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
safan-lab/safan Version 1.*
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 safan-form/form-manager contains the following files

Loading the files please wait ....