4

Yii2 Submit Spinner

Current version 1.1.0

  • New add-on, form_validate

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-source "c006/yii2-submit-spinner" "dev-master"

or add

"c006/yii2-submit-spinner": "dev-master"

to the require section of your composer.json file.

Required

  • jQuery
  • yii \ widgets \ ActiveForm

Options

class_id => {string}
The ID of the container. default: "SubmitSpinner"

form_id => {string}
The ID of the form

bg_color => {string}
Color of the overlay

bg_opacity => {float}
Opacity of the overlay

spin_speed => {int}
How many seconds a for a complete 360 rotation

radius => {int}
Pixel radius/width of the spinner

bg_spinner_opacity => {float}
Opacity of main spinner

bg_spinner_color => {string}
Color of main spinner

sections => {int}
How many dots or circles

section_size => {int}
Dot/circle size in px

section_color => {string}
Color of dots/circles

section_offset => {int}
How far from the center in px

section_opacity_base => {float}
Minimum opacity e.g. 0.25

proportionate_increase => {boolean}
Will increase/decrease dots proportionally to the main spinner

form_validate => {boolean}
Will trigger on successful ActiveForm validation

 

Usage

Added javascript functions

  • show_submit_spinner()
  • hide_submit_spinner()

Once the extension is installed, simply use it in your code by :

Defaults option:

All options: (using defaults)

All options: (5 large dots only, no background spinner)

 

 

Prakash S

Prakash S

I would like to introduce myself as a Software professional opting for the career in software industry. I'm Prakash S, a MCA graduate and trained as industry level practice for Software technology. Basically I am a PHP Developer but now days exploring more in HTML5, CSS, AngularJS and jQuery libraries.


  • I’ve been surfing online more than three hours today,
    yet I never found any interesting article like yours. It
    is pretty worth enough for me. Personally, if all web owners and bloggers made good content as you did, the internet will be a lot more useful than ever before.

  • Hello, I read your blog regularly. Your writing style is awesome,
    keep up the good work!