Download the PHP package adt/nette-forms-components without Composer

On this page you can find all versions of the php package adt/nette-forms-components. 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 nette-forms-components

Nette Forms Components

Installation

composer require adt/nette-forms-components

ADT\Forms\Form

Nette\Application\UI\Form subclass using ADT\Forms\BoostrapFormRenderer to render a form in Bootstrap 5 (default) or 4.

Overrides addError method (the parent method does not use the translator lazy).

Have @method annotations for all ADT Nette Forms components so PhpStorm auto completion should work out of the box.

ADT\Forms\BoostrapFormRenderer

Can be used on its own, without using ADT\Forms\Form (for example in Ublaboo\DataGrid\DataGrid::createComponentFilter method, which creates Nette\Application\UI\Form instance)

Can be switch to Bootstrap 4 calling ADT\Forms\BoostrapFormRenderer::$version = ADT\Forms\BootstrapFormRender::VERSION_4; (for example in your BasePresenter::beforeRender method).

If it's an AJAX request and the form is not valid, only snippets with error messages will be sent back to browser (without rendering the form).

Every error container carries data-adt-errors-for with the HTML id of its control (or form). Next to control errors an inline <script> is rendered that adds is-invalid to the control (and to its parent for radio/checkbox lists and input groups). When the Content-Security-Policy of the response would block it anyway (script-src-elem, script-src or default-src without 'unsafe-inline', or with a nonce, hash or 'strict-dynamic'), the script is omitted. A nonce does not help here, because error snippets arrive over AJAX with a nonce of a different request. The classes are then set by the SubmitForm component of adt-js-components from data-adt-errors-for.

If you need, you can use static methods ADT\Forms\BoostrapFormRenderer::makeBootstrap and ADT\Forms\BoostrapFormRenderer::sendErrorPayload manually (for example in \Ublaboo\DataGrid\DataGrid::setItemsDetailForm, where the container is created dynamically).

You can use ->setOption('description', 'Description text') to use field description.

You can use ->setOption('prepend', 'Text to prepend') or ->setOption('append', 'Text to append') to use proper inpur group styles.

Containers

Can be used on their own, without using ADT\Forms\Form.

Can be registered in your Bootstrap file like BaseContainer::register();. This will allow you to use addStaticContainer and addDynamicContainer methods in your forms.

ADT\Forms\Controls\PasswordRevealInput

Password input with an eye button to reveal the value. Register it with PasswordRevealInput::register(); to get the addPasswordReveal($name, $renderValue, $label) method.

The behaviour is driven by an inline <script> rendered next to the input. Since it is built in PHP outside of Latte, n:nonce cannot reach it, so the control reads the nonce from the already sent Content-Security-Policy (or Content-Security-Policy-Report-Only) header itself and puts it on the element. Without a presenter or without CSP the attribute is simply omitted.

Tests

composer install && composer tester


All versions of nette-forms-components with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
nette/application Version ^3.0
nette/forms Version ^3.2.3
nette/utils Version ^3.0 | ^4.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 adt/nette-forms-components contains the following files

Loading the files please wait ...