Download the PHP package lekoala/silverstripe-form-extras without Composer

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

Silverstripe Form extras module

Utilities to get better forms with Silverstripe

Handling jquery, mousewheel and gestures

We try to favor jquery.mousewheel and hammer as librairies to handle mousewheel and gestures. The idea is to try to avoid include other librairies that would do the job twice, leading to duplicated code and extra load time.

You can use the following helper to load these libraries in your own project:

FormExtraJquery::include_jquery();
FormExtraJquery::include_jquery_ui();
FormExtraJquery::include_hammer();
FormExtraJquery::include_mousewheel();

Base form class

New functionnalities

The FormExtra class comes with some simple but nice functionnalities.

There are also two new actions:

Multi steps forms

The FormExtraMulti class implements multi steps functionnality.

Each step is represented by a single "Form" object. Classes must be named in a sequential manner (Like MyFormStep1, MyFormStep2 ...) because the class name is used to determine which is the current step, the next step etc...

Actions are defined by calling

$actions = $this->definePrevNextActions()

This will create two actions: doPrev and doNext. doPrev will not be set on the first step while doNext will be translated differently on the last step.

By default, clicking on these buttons will simply save the data to the session and navigate into the form. It's up to you to override these methods to achieve what you want to do.

A template is also provided to add steps at the top of your forms. This template consumes the AllSteps method on the form that returns all steps with their properties.

NOTE: don't forget that validation will happen if you go back (doPrev) in the form. This might not be a desirable behaviour. If used in conjonction with ZenValidator, the FormActionNoValidation will be used to make sure that the validation does not happen when going back (while still saving the current state, allowing the user to freely navigate without losing data).

New fields

MiniColorsField

A field that uses the "minicolors" jquery plugin to pick a color. Its best to store the color using the DBColor field instead of a regular Varchar(7). You can set the theme using the MiniColorsField::setTheme method

BaseUploadField

An UploadField with a factory method to get an upload field with a folder name already set depending on the context. This context takes into account the current Subsite by default if the module is enabled. Otherwise the tendancy is to put everything in the "Uploads" folder which become quite unmanageable after some time.

ImageUploadField

An UploadField already set up for image upload

Sample usage:

$fields->replaceField('Logo', ImageUploadField::createForClass($this, 'Logo'));

FrontendUploadField

An UploadField ready to be used on the frontend. To allow editing on the frontend, make sure that you have a canEditFrontend method that returns true (according to whatever your security settings are).

This also adds a "Gallery" functionnality. Supports for "cropbox", "focuspoint" as image resize modules.

BetterCheckboxField

The default checkbox field in Silverstripe doesn't send any value if not checked. This one does!

BirthDateField

If you are like me and that your customers ask you to split the birthdate field in three...

ChosenField

A dropdown field integrated with Chosen http://harvesthq.github.io/chosen/

CmsInlineFormAction

As you may have noticed, the InlineFormAction class doesn't work quite well. This alternative is bare bones but does the job.

ComboField

A dropdown where values can be appended by the user.

MaskedInputField

A field that use Inputmask https://github.com/RobinHerbots/jquery.inputmask

PostcodeField

A field that validates postcodes according to a country.

RegexTextField

A field that validates against a specific regex

Select2Field

A field that uses Select2. Version 3 and 4 are supported. https://select2.github.io/

SexyPasswordField

A field that validates password according to your Member::password_validator()

SliderField

A field that uses jQuery ui slider

TableField

A field that supports multiple columns and unlimited rows. Data is stored as json.

SimpleTinyMceField

A simple TinyMceField plugin for frontend use

CropboxField

A field that uses CropboxField

GridField

GridFieldConfig_RecordDefault

A default config that uses GridFieldSortableRows, GridFieldOrderableRows and GridFieldBulkManager

GridFieldConfig_RelationDefault

A default config that uses GridFieldSortableRows, GridFieldOrderableRows and GridFieldBulkManager

GridFieldDownloadButton

WIP

GridFieldExportAllButton

The default export to csv button export only the current list, not all items. While this is nice in a way, sometimes your clients want to have a full export. Simple use this button to achieve this.

NOTE : to make your csv files open nicely on excel, simple use:

$btn->setCsvSeparator(';');

HasOne helper

Sometimes, you want to add a button to edit a HasOne relationship or even embed all the fields right inside a tab.

HasOneButtonField

Simple add the button as any other field:

new HasOneButtonField($name,$title,$this);

Embed all fields

Thanks to the HasOneEditDataObjectExtension, all fields named like Relation:Name or Relation/Name will load and save data from and to the Relation.

new TextField('MyRelation:MyField','My field name')

Recommended modules

Works best with

Compatibility

Tested with 3.1

Maintainer

LeKoala - [email protected]


All versions of silverstripe-form-extras with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ~3.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 lekoala/silverstripe-form-extras contains the following files

Loading the files please wait ....