GithubHelp home page GithubHelp logo

yii2-lock-form's Introduction

Yii2 Lock Form Extension


version Download Issues

Make form submit button disabled when the form submit.

Install

$ composer require light/yii2-lock-form=~1.0.2

Usage

Can can depends this in your assets:

if you depends on yii2-bootstrap, you can use light\widgets\LockBsFormAsset instead. So can decrease the asset size.

class YourAsset extends AssetBundle
{
    //..

    public $depends = [
        //your other depends
        'light\widgets\LockFormAsset'
    ];
}

Or directly inject in the view:

use light\widgets\LockFormAsset;

LockFormAsset::register($this);

License

MIT

yii2-lock-form's People

Contributors

lichunqiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yii2-lock-form's Issues

Please update README.md

Hi, lichunqiang

In the README.md, I see $ composer require light\yii2-lock-form=~1.0.2,
but when I excute this command, there has an error
"Problem 1
- The requested package lightyii2-lock-form could not be found in any version, there may be a typo in the package name.
"

Then I change the command with $ composer require light/yii2-lock-form=~1.0.2 that can success excute.

貌似表单打开ajax验证后,插件就不能用了.

<?php $form = ActiveForm::begin([
                'layout' => 'horizontal',
                'fieldConfig' => [
                    'template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}",
                    'horizontalCssClasses' => [
                        'label' => 'col-sm-2',
                        'offset' => 'col-sm-offset-2',
                        'wrapper' => 'col-sm-8',
                    ],
                    'enableAjaxValidation' => true,
//                    'enableClientValidation' => true,
                ],
            ]); ?>

这个时候无论是点 提交按钮 还是 直接表单中回车提交, 都无法锁定了.

请作者看看,多谢.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.