Jump to content
  • 0

Data Page - Change Font Size / Weight by Column


IMTanuki
 Share

Question

CONTEXT

- I have a table that contains Chinese characters in one column.

- The autoformat for Chinese characters renders them too small ad the font weight is too light.

 

QUESTION

Is there any way to  configure the font size and weight for a single column (field) in a data page?

 

Thanks!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

@alineer

Thanks for the reply...could you possibly expand on your answer?

1. On the data page elements config screen (either standard or advanced), I don't see any option to add css.

- If I modify the style, then I would need a specific style for each data page.  I don't think even that wouldn't work,because I plan to use data grouping.

- Could you specify exactly where to add the css? 

Thanks!

 

Link to comment
Share on other sites

  • 0

FYI for anyone else who has this question  - the following JS works, with exceptions:

JS SCRIPT

<div id="mydiv[@field: AAABBB]"></div>

<SCRIPT LANGUAGE="JavaScript"> {

document.getElementById("mydiv[@field:AAA_BBB]").innerHTML ="<span style='color: #9476c9; font-size: 24px; font-family: Arial, sans-serif; font-style: normal; font-weight: bold; text-align: center;'> [@field:AAA_CCC] </span>";

}

</SCRIPT>

LEGEND

AAA_                  Table Name (if underlying data source is a view)

BBB                     PK Column Name

CCC                     Column Name of the field to be displayed.

 

EXCEPTIONS

CSS text-align: center; does not work

The label override (in General Options, not in the Source area) does not work.

CASPIO - 2018-03-13 - FORMAT FIELD - 03.png

Link to comment
Share on other sites

  • 0
On 3/15/2018 at 9:56 PM, IMTanuki said:

@alineer

Thanks for the reply...could you possibly expand on your answer?

1. On the data page elements config screen (either standard or advanced), I don't see any option to add css.

- If I modify the style, then I would need a specific style for each data page.  I don't think even that wouldn't work,because I plan to use data grouping.

- Could you specify exactly where to add the css? 

Thanks!

 

Hi hello, yes. I got a bit busy with work...

You would add a header/footer block to your page, and add <style></style>, and put the custom css between those tags. I know it seems a bit roundabout, but it works. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...