Download the PHP package toutouwai/fieldtype-dynamic-options without Composer

On this page you can find all versions of the php package toutouwai/fieldtype-dynamic-options. 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 fieldtype-dynamic-options

Dynamic Options

A module for ProcessWire CMS/CMF. A Fieldtype for dynamic options that are generated at runtime via a hook.

Configuration

Inputfield type

You can choose from a range of inputfield types on the Details tab of a Dynamic Options field. Your field will return a string or an array depending on if the selected input field type is for "single item selection" or "multiple item selection".

Maximum number of items

You can define a maximum number of items the field is allowed to contain. The core inputfields supported by this module will become disabled once the limit is reached. This option is only applicable if you have selected an inputfield type that is for multiple item selection.

Format as Pagefile/Pageimage object(s)

If the field will store paths/URLs to Pagefiles/Pageimages then you can enable this option to have the formatted value be a Pagefile/Pageimage object for "single" fields or an array of Pagefile/Pageimage objects for "multiple" fields.

There is a related Select Images inputfield module that allows you to visually select image thumbnails.

Defining selectable options

Selectable options for a Dynamic Options field should be set in a FieldtypeDynamicOptions::getSelectableOptions hook in /site/ready.php. The hook should return an array of options as 'value' => 'label'.

An example hook is shown on the Details tab of a Dynamic Options field:

Formatted value

If a Dynamic Options field uses a "single" input type then its formatted value is a string, and if it uses a "multiple" input type then its formatted value is an array. The unformatted value of a Dynamic Options field is always an array.

Also see the Configuration section above for description of an option to have the formatted value be Pagefile/Pageimage object(s).

Examples of possible uses

dynamic-options


All versions of fieldtype-dynamic-options with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
processwire/processwire Version >=3.0.0
wireframe-framework/processwire-composer-installer Version ^1.0.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 toutouwai/fieldtype-dynamic-options contains the following files

Loading the files please wait ....