Replies: 2 comments
-
Hi Jon, Combining conditions is not something the KTL supports. But it's possible to achieve what you want by using the _cls keyword and some CSS, to create a AND (boolean logical operator) condition. Here, you'd add two _cls keyword in your view, each adding cond1 and cond2: _cls=[cond1], [ktlCond, has, YES, field_246, Example1], [ktlTarget, field_123] Then in your CSS, you'd have: .cond1.cond2{ Hope this helps, |
Beta Was this translation helpful? Give feedback.
-
I'll give it a try. Any future plans to add this to KTL?
Thanks... JON
…On Thu, Mar 13, 2025 at 9:40 AM Cortex R&D Inc. ***@***.***> wrote:
Hi Jon,
Combining conditions is not something the KTL supports.
But it's possible to achieve what you want by using the _cls keyword and
some CSS, to create a AND (boolean logical operator) condition.
The AND operator is when you must have both condition 1 *and* conditon 2
to be satified in order to do something - like hiding an element in your
case.
Here, you'd add two _cls keyword in your view, each adding cond1 and cond2:
_cls=[cond1], [ktlCond, has, YES, field_246, Example1], [ktlTarget,
field_123]
_cls=[cond2], [ktlCond, has, Dallas, field_789, Example1], [ktlTarget,
field_123]
Then in your CSS, you'd have:
.cond1.cond2{
display: none;
}
Hope this helps,
Norm
—
Reply to this email directly, view it on GitHub
<#449 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAZFANFGSRCQHMCEFMXWZ3D2UGKG5AVCNFSM6AAAAABW7QWOUGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENBYHE2DQOI>
.
You are receiving this because you authored the thread.Message ID:
<cortexrd/Knack-Toolkit-Library/repo-discussions/449/comments/12489489@
github.com>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
For various reasons, I'm trying to replace the rules in a details page and would like to use the keyword ktlCond.
I know that using this keyword, I'm able to for example, hide a field based on a single condition. Similar to the Display Rules in Knack, I'd like to be able to apply multiple rules for a field.
_hf=[field_123], [ktlCond, has, YES, field_246, Example1] - hides field 123 if field 246 is YES in the Example1 details view
But I'd like to be able to hide field_123 if field 246 has "YES" and field 789 has "Dallas" as an example and have the ability to add a third (or more conditions) if needed.
Is this possible using ktlCond and if yes, how?
Thank you... JON
Beta Was this translation helpful? Give feedback.
All reactions