Giter Site home page Giter Site logo

h1d / jquery-grewform Goto Github PK

View Code? Open in Web Editor NEW
68.0 68.0 13.0 84 KB

This little plugin helps to declare complex form logic, like 'show this <input> when user select this option'. Yes! In declarative style.

License: MIT License

JavaScript 91.92% HTML 8.08%

jquery-grewform's People

Contributors

andre487 avatar bryant1410 avatar h1d 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  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  avatar

jquery-grewform's Issues

Не работает скрипт при определенных условиях (2 формы)

Имеется общий шаблон layout.twig

в котором написано

<script type="text/javascript">
        $(document).ready(function () {
            $('form[name="1"]').grewform({
                '[name="apk_[16]"]:checked[value=""]': {
                    show: '#apk_17'
                }
            });

            $('form[name="2"]').grewform({
                '#mpk_13_0:checked': {
                    show: '#uo-innovent'
                }
            });

        })
</script>

А также имеется 2 страницы которые extends от layout.

На первой странице существует только форма [name="1"], тут скрипт работает
2 форма на этой странице не существует

НА второй странице существует только форма [name="2"] и тут скрипт не работает( не выполняются прописанные условия)

Стоит закомментировать инициализацию скрипта для 1 формы и скрипт успешно обрабатывает условия для 2 формы.

Зависание ввода в поля из-за формы

Когда создана большая форма ( > 40 полей ) При вводе текста в Input браузер начитает подвисать. Как я выяснил это происходит из-за того что на все (АБСОЛЮТНО ВСЕ!) элементы формы вешаются события keyup, focus.

Зачем? даже на заголовки ( простой текст) нужные для логического разделения формы
!

1
2

Is it only for jquery 1.4.2 ?

Hi,

Very nice plugin, but It seems working only using jquery-1.4.2, with every newer jquery versions it doesn't work ... : (

Rollback rules takes longer the more rules that should be rolled back

When rolling back a rule that show multiple elements the time it takes to perform the rollback seems to be directly proportional to the number of elements that should be rolled back. For example the following rule takes approximately 2s to rollback

"#controllingElement:checked": {show: "#element1, #element2, #element3, #element4"}

while the following starts performing virtually immediately

"#controllingElement:checked": {show: "#element1"}

Also the rule with multiple elements to show is not slow at all when performing the show, just the rollback.

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.