How can I add styling like font color, italics, etc to my forms?

Thanks Pierre,
I will update the thread with the info. Weirdlg it looks like some of the basic html isn't working (such as
). It might be worth you sharing your results on their forum to get a response? You have got a few formatting options at least :slight_smile:

Just reviving this thread as I was trying to format choices for ODK Collect (v1.18.1) and it is not working. Tried also to preview in Enketo through the XML generated from https://opendatakit.org/xlsform/ and it's not working either. Has the markdown for choices been fixed?

Hi @techGus

could you attach your form? We had a bug with styling choices in v1.18.0 but i's fixed in v1.18.1 so everything should be fine.

@Grzesiek2010

I just found out that the issue is with the compact appearance tag. When I removed it, the colors showed as expected. Enabling the compact appearance makes the label show with all the HTML.

Not sure if this is an expected behavior or if this was overlooked and the documentation doesn't specifically say that colors for choices only works for the normal list appearance.

You are right that's an issue with the compact appearance. We have never supported form styling with the compact appearance. I'll file an issue in our repository.

Do you really need to use styling with the compact appearance or it's just a bug you have run into accidentally?

A post was split to a new topic: Background image on screen

Hi, just to flag that we would find it useful to use styling with the compact appearance, and that the issue remains with latest version. Thanks

I am having an issue styling my application form. I want to add line breaks and perhaps underline some of the text. I read online that may be used which is not working. I also tried setting text-decoration to underline in a span's style and that worked on the web preview but not on the android ODK application. Can anyone guide me on how one might underline a portion of text? And also is there any way to explicitly add a line break to a paragraph. The break tag does not seem to work. I am adding these changes in the label column on an xls form.

Hi @azam_iqbal,

Have you looked at the sample in form-styling?

Check it closely, is has all formatting that you can do

I already check please make a xls form in which we underline some text in question

Hi @azam_iqbal, just download the sample form and check, making another one is just duplication.

Line break i do ALT+ENTER this work prefectly through excel but i found below issue
where write code underline i want my text in label column underline
like
DISTRICT%20UNDERLINE

As suggested, if you download the sample form, examples are contained. Line breaks are easily represented using basic html such as <br> , underlining can be done in the same way.

Really worth downloading the sample from referenced above and looking at the examples in it.

2 Likes

I understand that this has not been resolved still? The post on Git suggests that it has been tabled. I need to change the font of choice labels in my form so wondering if it is not actually possible.

Thank you!

Hi @yuliab
which issue exactly? Could you attach a sample form?

Hello - sorry, I meant the formatting of choice labels. In the attached form I am trying to change to font of choice labels. The same syntax works fine for the survey label, but choices just displays everything together with the HTML. example.xlsx (21.8 KB) Thanks for looking into this!

Could you just try another font like in the doc https://docs.opendatakit.org/form-styling/
I think the one you try to use is not available on your device.

Formatting the choice labels does not work even when I try it out with the "sample styling" form attached in the example on https://docs.opendatakit.org/form-styling/ MarkdownExamples.xlsx (26.4 KB). Choice labels display the HTML, e.g., https://ee.kobotoolbox.org/x/#t1lzk6Sd.

After I install the Bamini font on my computer I can change survey labels to that font with no problem. However, I cannot do the same for choice labels, so it doesn't seem like not having the font is the problem. Although of course it would be much better if I had my translations in a Unicode font to begin with and would not have to go through changing the font at all (but this is a separate discussion).

Thanks!

1 Like

What tool do you use? ODK Collect or maybe our fork like Kobo?

I am using Kobo - sorry perhaps should have specified at the outset.