Download the PHP package heimrichhannot/contao-form-fields-collection-bundle without Composer

On this page you can find all versions of the php package heimrichhannot/contao-form-fields-collection-bundle. 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 contao-form-fields-collection-bundle

Form Field Collection Bundle

This bundle adds additional form fields to the Contao form generator.

Fields

Installation

Install the bundle via composer and update your database afterwards:

Usage

After installation, the additional field types are available in the Contao form generator.

Date/Time field

Select the field type "Date/ time" and select the format (date or time).

Single Checkbox field

Select the field type "Checkbox Single". Then configure the checkbox label in the text field and, if needed, define a custom submitted value in the value field. If no value is set, the checkbox submits 1.

Like other Contao form fields, you can also mark the checkbox as mandatory and provide a help text.

Templates and customization

Twig templates are provided under contao/templates/twig/ and follow Contao's core form templates:

Template Purpose
form_huh_datetime.html.twig Date/time field; inherits from the widget's configured parent template (form_text by default)
form_huh_single_checkbox.html.twig Single checkbox with a rich-text option label
form_huh_single_checkbox_bs5.html.twig Bootstrap 5 single checkbox variant

The existing .html5 templates remain available. New customizations should use Twig.

The single-checkbox templates support these variables:

Variable Description
option_wrapper_element Wrapper tag; defaults to span (div in the Bootstrap 5 variant)
option_wrapper_attributes Option wrapper attributes, built with attrs()
checkbox_attributes Checkbox input attributes, built with attrs()
label_attributes Option label attributes, built with attrs()
error_wrapper_element Error wrapper tag; defaults to p
error_wrapper_attributes Error wrapper attributes, built with attrs()
invisible_class Twig-only class for visually hidden mandatory-field text; defaults to invisible (visually-hidden in the Bootstrap 5 variant)

To use the Bootstrap 5 variant as the project default, create this override in your project's Twig root:

The Bootstrap variant adds form-check, form-check-input, and form-check-label classes. It extends the bundle's base template through its bundle-specific namespace so that the project override does not create circular inheritance. Bootstrap CSS must be provided by your project.

Additional attributes can be set in the same override:

Upgrading from 0.2.2 to 0.3.0

Update PHP and Contao to the required versions before upgrading the bundle. The following deprecated template variables are no longer read, in either PHP or Twig templates:

Removed variable Replacement
errorAttributes error_wrapper_attributes
wrapperElementAttributes option_wrapper_attributes
checkboxAttributes checkbox_attributes

Update custom templates to use the replacements. Local PHP variables are unaffected; this change concerns the widget/template customization properties.

Existing overrides that explicitly extend a .html5 template continue to use that legacy template. Change the parent reference to its .html.twig counterpart to adopt the Twig version. The backend be_tinyMCE_option.html.twig template now lives in the bundle's Twig root; its template name is unchanged. The unused form_huh_successMessage.html5 and .html.twig templates have been removed; the associated widget was already removed in 0.2.0. Clear Contao's cache after updating so template discovery picks up the changes.

Development

Install development dependencies in the bundle directory, then run:

The toolchain targets PHP 8.4. Rector uses PHP 8.4 rules, explicit Contao migration sets, and Composer-based Symfony/Doctrine rules. PHPStan checks at level 4 with PHP 8.4 as its target. ECS uses PSR-12 and its prepared formatting sets. CI runs these checks on PHP 8.4.


All versions of contao-form-fields-collection-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
contao/core-bundle Version ^5.7
symfony/http-kernel Version ^6.4 || ^7.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 heimrichhannot/contao-form-fields-collection-bundle contains the following files

Loading the files please wait ...