Download the PHP package demogorgorn/yii2-ajax-submit-button without Composer

On this page you can find all versions of the php package demogorgorn/yii2-ajax-submit-button. 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 yii2-ajax-submit-button

AjaxSubmitButton for Yii 2

=====================================

Latest Stable Version Total Downloads License Monthly Downloads Yii2

This is the powerful AjaxSubmitButton widget that renders an ajax button which is very similar to ajaxSubmitButton from Yii1 for Yii 2, but has many useful functions.

Basic Example

Example of usage of the widget with a custom widget (in this case Select2 widget).

The view:

Please note: that #output is a div element which will be updated.

In controller:

Example of usage with ActiveForm and client validation

The view:

As you can see it's quite easy to use the widget with ActiveForm - enough to set the ActiveForm's id to the 'useWithActiveForm' variable. (In this case id is 'add-form', without '#' symbol!).

Client validation

As I said before the widget can be used with ActiveForm and client validation enabled. If you wish to disable it, just set ActiveForm's 'enableClientValidation' to false.

Preloader use

It's possible to use the widget with your own custom preloader.

File Uploads

AjaxSubmitButton fully supports file uploads. For example (look at the comments):

Widget's options

Variable Description Type
ajaxOptions ajax options Array
options HTML attributes and other options of the widget's container tag Array
tagName the tag to use to render the button (by default is 'button'. You can specify, for example, 'a' tag) String
label button's label String
icon button's icon String (e.g. 'fa fa-download')
iconPosition button icon position const (ICON_POSITION_LEFT or ICON_POSITION_RIGHT)
encodeLabel whether the label should be HTML-encoded Boolean
clickedButtonVarName js object name. It is unused when useWithActiveForm is enabled String
useWithActiveForm whether the button should not be used with ActiveForm. the id of ActiveForm to use the button with Boolean / String

Installation


The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file and run composer update.


All versions of yii2-ajax-submit-button with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version *
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 demogorgorn/yii2-ajax-submit-button contains the following files

Loading the files please wait ....