Closed onshop closed 9 years ago
Thanks, @onshop. I'm glad its working out for you. Adding an empty qualifier is a great idea. I'll probably add that to the next release, or feel free to submit at PR. The not qualifier should work fine to enable a subject when the dependency's value is not an empty string. However, if you want to enable the subject only when the dependency's value is an empty string you could use the match qualifier, which checks the value against a regular expression. In this case, you could use the regex \.+\
.
Thanks for the workaround @dstreet. I'll give that a try.
My current workaround:
deadLineDate = $("#deadlineDate").dependsOn({
#deadline_reason': {
match: /\S/
}
}, {
hide: false,
});
$( "#deadline_reason" ).keyup(function() {
deadLineDate.check();
});
Great plugin. Just what I was looking for. A nice extra in the configuration would be whether a preceding text field has any value at all. I tried not: [''] but that didn't seem to work. Maybe an 'empty' boolean qualifier could be added.