Search code examples
oracle-apex

Oracle Apex: Is it possible to set HTML as item value in checkbox group?


I have an checkbox item that gets values from table, I want to display part of text as a subtext like in this example: checkbox values in format I want it to be displayed

Is it possible to do this using HTML or in any other way? Thank you

I tried to send value in pure HTML format but it just displays HTML elements as text in application.


Solution

  • Here is an example of how to achieve your requirement.

    • Create Page Item of type "checkbox group"
    • Use "SQL Query" as source for the List Of Values: Source:
    SELECT 'Large Text<br><span style="font-size:16px">this is large text</span>', 1 FROM DUAL UNION ALL
    SELECT 'Large Text<br><span style="font-size:10px">this is small text</span>', 2 FROM DUAL
    
    • Uncheck the attribute "Security > Escape special characters"

    This gives the following result:

    enter image description here