h1d / jquery-grewform Goto Github PK
View Code? Open in Web Editor NEWThis little plugin helps to declare complex form logic, like 'show this <input> when user select this option'. Yes! In declarative style.
License: MIT License
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
Имеется общий шаблон 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 формы.
Hi,
Very nice plugin, but It seems working only using jquery-1.4.2, with every newer jquery versions it doesn't work ... : (
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.