cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to dynamically change font size of text box

Velkumar
17-Peridot

How to dynamically change font size of text box

Hi,

 

I'm trying to change the font size of the text box label using custom CSS. So whenever a user enters something into the text box, the custom CSS class will be changed using the expression function. 

 

Velkumar_0-1640675211373.png

 

This is for one text box widget. If I want to use more than 20 text boxes, I need to create 20 expressions to validate/change the custom CSS class. 

 

Is there some efficient way to achieve this requirement instead of creating multiple expression functions 

 

Regards,
VR

 

6 REPLIES 6
PaiChung
21-Topaz II
(To:Velkumar)

You can assign a 'custom class' to the text boxes and then create CSS for that one 'custom class'.

Better yet, create custom classes for any widget types that need this behavior and put your CSS in a Master so it 'trickles' down into all your mashups.

Velkumar
17-Peridot
(To:PaiChung)

Hi @PaiChung 

 

Sorry I didn't get it properly. Could you please give some example 

 

/VR

PaiChung
21-Topaz II
(To:Velkumar)

https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Mashup_Builder/...

 

You can also do searches from support.ptc.com to perhaps find additional examples and directions.

Velkumar
17-Peridot
(To:PaiChung)

@PaiChung 

 

I have created a custom CSS class already. My requirement is to check whether the text field contains some values or not. If it contains values I should use Custom class 1 else Custom class 2. For this operation, I'm using expression to check text field value.  

 

Now if I have 30 text fields I need to create 30 expression functions. My question is there any way to check text field values using the CSS class 

PaiChung
21-Topaz II
(To:Velkumar)

I don't think you can do this through the CSS.

However I'm not a CSS expert.

slangley
23-Emerald II
(To:Velkumar)

Hi @Velkumar.

 

You could possibly use the Grid Advanced widget which has state-based formatting.  Under 9.3, it's just called Grid.

 

Regards.

 

--Sharon

Announcements