• Resolved PB

    (@ohtusabes)


    Hi @codepeople2

    I’m creating a dropdown list of medications, where the calculated field displays the value of each selected medication. My goal is for the calculated field to display a formatted bulleted list (e.g., for acyclovir). However, when I tried using HTML tags, they didn’t render as expected.

    Do you have any advice on how to achieve this?

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author CodePeople2

    (@codepeople2)

    Hello @ohtusabes

    The calculated field contains an input tag. It cannot render HTML. However, you can use it as an auxiliary to return the HTML structure but display the result in another control that renders HTML. Please insert an “HTML Content” field in the form and enter a DIV tag in its content with the data-cff-field attribute indicating the name of the field whose value you want to display in the tag:

    <div data-cff-field="fieldname82"></div>

    Finally, since the calculated field is used as an auxiliary, it is irrelevant in the form interface, you can hide it by ticking a checkbox in its settings.

    Best regards.

    Thread Starter PB

    (@ohtusabes)

    Hi @codepeople2

    Yes, it works. However, the HTML does not display any text or borders, similar to how a calculated field behaves. Is there a way to emulate this?

    Thanks in advance.

    Plugin Author CodePeople2

    (@codepeople2)

    Hello @ohtusabes

    You can apply to the DIV field all CSS rules you want to obtain the preferred design.

    E.g.

    <div data-cff-field="fieldname82" style="border:1px solid #7e8993;border-radius:3px;"></div>

    Best regards.

    Thread Starter PB

    (@ohtusabes)

    Hi again @codepeople2

    That′s, great.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.