Hello @hheyhey568
Yes, you can use HTML tags in the fields labels, like m<sup>2<sup>.
Best regards.
Hello,
Thank you for reply.
For following case , I want to just make 2 as superscript of ft. How to write it pls?
Btu/hr ft2 F.
-
This reply was modified 4 years, 1 month ago by
hheyhey568.
Hello @hheyhey568
The information to include in the field’s label would be: Btu/hr ft<sup>2</sup> F
Best regards.
Thanks a lot.
I have some of the field which are having change label code which changes the label.
Can we update the change label method with code which also takes care of superscript?
Hello @hheyhey568
I’m sorry, I will need additional details. Please, indicate the code you are using to modify the field’s label.
Best regards.
Hello Team,
following is the code being used to change the label text.
Can we superscript 3 ?
(function(){
var l = getField(3).jQueryRef().find('label');
if(fieldname2=='fps') l.text('lb/ft3)');
if(fieldname2=='si') l.text('kg/m3');
})()
Hello @hheyhey568
If you use the .text jQuery method the html tags are encoded as texts. The correct would be:
l.html('lb/ft<sup>3</sup>');
Best regards.
Hello Team,
Thanks for the reply.
One more question: Lets say I want the label of certail field to change as per the label of other fieldname.
For example:
fieldname1 label= deg C
fieldname2 label= deg F
(function(){
var l = getField(3).jQueryRef().find(‘label’);
l.text(‘lb/ft3)’,fieldname1 label,fieldname2 label);
})()
In above example , I want that the label of fieldname3 becomes lb/ft3 , deg C , deg F
Is it possible? Please guide.
Hello,
Yes, of course, that’s possible. You can implement the equation as follows:
(function(){
var l1 = getField(fieldname1|n).jQueryRef().find('label').html(),
l2 = getField(fieldname2|n).jQueryRef().find('label').html();
getField(3).jQueryRef().find('label').html('lb/ft3,'+l1+','+l2);
})()
If you don’t vary the labels of the fieldname1 and fieldname2 fields at the runtime as you are doing with the fieldname3 label, the previous equation would be simpler:
getField(3).jQueryRef().find('label').html('lb/ft3,'+getField(fieldname1|n).title+','+getField(fieldname2|n).title);
Best regards.