1

We are developing an XForms-based survey system. The client wants to add rich-formatting to labels and hints.

Is this possible? If so, how do you define formatting on the XForm xml? Is there a reference page that I can go to?

UPDATE: We're currently implementing for ODK, which uses JavaRosa. We're planning to launch our own mobile application later, keeping compatibility with the current ODK Collect application.

UPDATE 2: Our client would actually like to have a label in the form of:

The quick brown fox jumped over the lazy dog.

Christophe Roussy
  • 16,299
  • 4
  • 85
  • 85
Pablo Venturino
  • 5,208
  • 5
  • 33
  • 41
  • Which XForms engine are you planning to use? I suppose that your question aims at an implementation-specific issue. If you're using a server-side solution, it's likely that you can use standard CSS to style the labels and hints. – tohuwawohu May 03 '12 at 16:15
  • @tohuwawohu right, I forgot. We're currently using ODK Collect as client (which uses JavaRosa). We plan to develop our own compatible HTML5 client on the future. – Pablo Venturino May 03 '12 at 17:58
  • This seems to be an ODK limitation because other XForms implementations (such as mine, XSLTForms) allow html elements with styling for labels or hints. – Alain Couthures May 03 '12 at 19:39
  • @PabloVenturino: sorry, i don't have any experience with ODK Collect, so i can't help you with this. As Alain states, it seems to be a limitation of that software. Most server-side frameworks allow for displaying arbitrary HTML content in labels and hints. – tohuwawohu May 03 '12 at 20:20
  • @PabloVenturino As Alain said, it definitely depends on the implementation. XForms itself allows rich (inline) formatting within labels, help, hint and alert elements. – ebruchez May 03 '12 at 20:56
  • Thanks guys, I get it. – Pablo Venturino May 04 '12 at 14:05

1 Answers1

0

ODK Collect doesn't have rich formatting but you can use images. I put together a text renderer that allows you to format your text with pango markup if that's any help.

Nathan Breit
  • 1,661
  • 13
  • 33