Replies: 14 comments 16 replies
-
Hi Jon _cfv should do this as long as it's on the view view qith the field you are checking against. The options value of cfv is h.
This is untested but should work Craig |
Beta Was this translation helpful? Give feedback.
-
Hey Craig, that worked. Not sure if it's possible, but I'd like to use the keyword _ar (my favorite) to auto refresh the rich text view field. What I'm noticing is that when my referenced field (#255) changes from YES to NO, the rich text view won't always hide/show based on field #255 unless I refresh browser and I don't know where I can put the _ar keyword on the rich text view. Do you ??? Thanks again for your help... JON |
Beta Was this translation helpful? Give feedback.
-
If you could show me a screenshot of the page. How is the yes updated?
Craig
…On Sun, 15 Oct 2023, 15:27 jbk68, ***@***.***> wrote:
Hey Craig, that worked. Not sure if it's possible, but I'd like to use the
keyword _ar (my favorite) to auto refresh the rich text view field.
What I'm noticing is that when my referenced field (#255) changes from YES
to NO, the rich text view won't always hide/show based on field #255 unless
I refresh browser and I don't know where I can put the _ar keyword on the
rich text view. Do you ???
Thanks again for your help... JON
—
Reply to this email directly, view it on GitHub
<#117 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQQXA6FGAPLVAUQUE3DECLX7PXD3ANCNFSM6AAAAAA6BALJKU>
.
You are receiving this because you commented.Message ID:
<cortexrd/Knack-Toolkit-Library/repo-discussions/117/comments/7285215@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
I was simply going into the builder and toggling (updating) the value for field 255 from YES to NO, NO to YES, to see if the suggestion you posted worked. Field 255 on the table is changing as I make changes, but I have the keyword _ar set to 5 so that the view/table updates every 5 seconds to reflect any data changes. Just looking for a way to have rich text view (view_276) update as well using same keyword and settings. Just wondering if there is a way to place the KTL keywords on a rich text view. |
Beta Was this translation helpful? Give feedback.
-
Knacks page rules will do this so that what ever the value when some comes
to the page it will either be hidden or not.
If you need the rich text view to hide based on the YES/NO in the table you
would need the table to ar not the rich text view.
…On Sun, 15 Oct 2023, 15:45 jbk68, ***@***.***> wrote:
I was simply going into the builder and toggling (updating) the value for
field 255 from YES to NO, NO to YES, to see if the suggestion you posted
worked. Field 255 on the table is changing as I make changes, but I have
the keyword _ar set to 5 so that the view/table updates every 5 seconds to
reflect any data changes.
Just looking for a way to have rich text view (view_276) update as well
using same keyword and settings.
Just wondering if there is a way to place the KTL keywords on rich text
view.
—
Reply to this email directly, view it on GitHub
<#117 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQQXA3IAJCAJQINT5NJ3N3X7PZILANCNFSM6AAAAAA6BALJKU>
.
You are receiving this because you commented.Message ID:
<cortexrd/Knack-Toolkit-Library/repo-discussions/117/comments/7285295@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Hmm..., currently when I manually change field's data from "NO" to "YES" , the rich text hides AND the field in table updates to "YES" seamlessly (no refresh needed) thanks to _ar keyword. But when I manually change field's data from "YES" to "NO", the rich text DOESN'T show on view but the field in the table now shows "NO" again seamlessly thanks to _ar. In order for me to show the rich text at this point, I have to either go to another page and then back or refresh browser (chrome). It's no big deal if I get it working or not. I was simply trying to show a message on the screen based on field's value. And the only way I know how to show a message is by using a rich text view. It shows up, but I wish there was a way to refresh the rich text view like you can a grid or details view using _ar. Thanks again... JON |
Beta Was this translation helpful? Give feedback.
-
Hi In looking at the ktl.js the _ar keyword will re-render the table and will also run any code on the view as well that specifically a A question for Norm Craig |
Beta Was this translation helpful? Give feedback.
-
Hi guys, First, I think the reason why the Rich Text doesn't always hide/show as expected is because is because all views are refreshed asynchronously, (random order). The best way to achieve your goal is to have the _ar on the view that has your field_100 (seen as the trigger), then also add _rvr=richtext view, so they are linked, but in a proper and predictable order. _rvr is Refresh View after Refresh. Norm |
Beta Was this translation helpful? Give feedback.
-
Thank you Norm
I'd forgotten about that.
Craig
…On Tue, 17 Oct 2023, 20:37 Cortex R&D Inc., ***@***.***> wrote:
Hi guys,
First, I think the reason why the Rich Text doesn't always hide/show as
expected is because is because all views are refreshed asynchronously,
(random order).
The best way to achieve your goal is to have the _ar on the view that has
your field_100 (seen as the trigger), then also add _rvr=richtext view, so
they are linked, but in a proper and predictable order.
_rvr is Refresh View after Refresh.
Norm
—
Reply to this email directly, view it on GitHub
<#117 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQQXA6G4PZJ5USF3R3VY4TX73M6BAVCNFSM6AAAAAA6BALJKWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TGMBXGY3DC>
.
You are receiving this because you commented.Message ID:
<cortexrd/Knack-Toolkit-Library/repo-discussions/117/comments/7307661@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Guys, I found the problem! It was a pretty tough one. I know it's pretty technical, but in short, it is due to the ktlDisplayNone class that is added by the _cls keyword when the condition is met (YES in this case). That class remains active after a hide command from the _cls because by design, there is no way to remove it using the _cls keyword. Instead, we must explicitly remove the class using the _cls keyword like this:
To summarize everything, you should have this in your driving view. I assume it's a Details view: Assuming that the rich text view is view_253
The _cls line will remove the ktlDisplayNone class, showing the view_253. Notes:
Norm |
Beta Was this translation helpful? Give feedback.
-
Jon, Can you try the beta version please? I can't do a full release at this point due to code still in development. The version 0.16.4-beta is the one you need. Your loader portion in the Javascript pane should look like this:
Then once this is added, you can try the fix above with the _cls keyword. Norm |
Beta Was this translation helpful? Give feedback.
-
Hi Jon, I've just completed a major KTL update again - we're now at 0.17.0. I will update the documentation shortly, but here's the solution for the Rich Text view you need to hide, based on a condition. Rich Text views now support keywords, and So add this in your Rich Text view:
It means, hide this view if fieldName in viewName is NO. Let me know if this works as expected. |
Beta Was this translation helpful? Give feedback.
-
Hey Norm, I tried adding the _hv to the rich text view and it didn't work. Not 100% where to place the keyword on the rich text, but as you know, there is a lot of options due to the fact it doesn't have a title field or description field. I placed it where the existing text was, both below and above existing text and in the html part both with unsuccessfully results. Here is my keywords I tried: _hv=ktlCond, is, NO, field_376, view_120 and I tried _hv=ktlCond, is, NO, AH, Customer Info Thank again Norm... |
Beta Was this translation helpful? Give feedback.
-
Hey Norm, I'm a 110% sure I'm using 17.0. I placed the keyword at the end of the my text in rich text. So basically it looks like this in the Rich Text View: MY TEST TEXT _hv=ktlCond, is, NO, field_376, view_120 Still can't get it to hide when value changes from NO to YES. Field 376 is a field from a connected table, would that matter? Field 376 is on and view able in the table in view 120. When I manually change the data in builder, I can see the changes for field 376 in view 120 made instantly. Thanks for the Sunday morning help... JON |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Using KTL, I'm trying to figure out how to hide a Rich Text View based on another fields value using a KTL keyword.
Example: hide Rich Text if field_100 = "YES".
Any and all help would be appreciated... JON
Beta Was this translation helpful? Give feedback.
All reactions