??? How do we use new ftr: Class in Display Rule

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

??? How do we use new ftr: Class in Display Rule

Post by Jaymer »

per Changelog for 8.4:
Arbitrary CSS styles can now be used in item display rules

I can't seem to get this to work.
On this screen, lets say I want to add a presentation STYLE rule.
Using the default mechanism, I can set a foreground, background, etc.
But I should be able to add a class, right?

the top input field builds a Style.
Whats the syntax to make this be a class?
-> class="myClass"
-> myClass
-> .myClass

have tried many ways. Buy "myClass" never shows up in the browser Inspector.
Screen Shot 2020-01-06 at 12.57.53 AM.png
Screen Shot 2020-01-06 at 12.57.53 AM.png (34.9 KiB) Viewed 5512 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: ??? How do we use new ftr: Class in Display Rule

Post by Jaymer »

Even though this is not labeled "Display Rules", its now called "Presentation rules" on a Form Field (a recent 8.3 change where several styling areas were merged into this new property dialog) and uses the same/similar dialog, so I'm assuming that if you can set a Item Display Rule on a Query to a CLASS, then you could also use a CLASS for a style here.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: ??? How do we use new ftr: Class in Display Rule

Post by johntalbott »

The CSS Style in this configuration form is altering the "style" attribute of the associate HTML element. "class" is different attribute of an HTML element. See below.

<input id="aw_field_Customer_EmailAddress_19417" type="email" class="k-textbox" name="EmailAddress" maxlength="60" style="width: 350px;">

Similar to changing the tabindex in your other post, you could add a css class via jQuery in the render script of the form.

Code: Select all

$("input[id*='fLastBillDate']").addClass('myClass');    
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: ??? How do we use new ftr: Class in Display Rule

Post by Jaymer »

Yes, but the purpose of this post is to figure out how to use a new feature that aware advertised.
In the example where I wanted to indicate to a user that these calculated fields were not changeable, the way I ended up doing that was to use a presentation rule to make the field gray.
So using aware’s dialog box, I had to manually set the background pattern to #e8e8e8, for example.
And then I changed the next field.
And then I changed the next field.
And then I said, what if the user doesn’t like the gray, I’m gonna have to come back and change all of these individually to a different color.
Wouldn’t this be nice to have it in a class?
Oh, didn’t I see this in a new feature recently?

So that’s why I’m trying to get some clarification from support on exactly how to use this.
Last edited by Jaymer on Wed Jan 08, 2020 9:07 pm, edited 1 time in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: ??? How do we use new ftr: Class in Display Rule

Post by johntalbott »

10-4
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
Post Reply