HtmlPopulator

class HtmlPopulator(questionnaireResponses: List<QuestionnaireResponse>)

HtmlPopulator class is responsible for processing an HTML template by replacing custom tags with data from QuestionnaireResponses. The class uses various regex patterns to find and replace custom tags such as @is-not-empty, @answer-as-list, @answer, @submitted-date, @contains, and @is-questionnaire-submitted.

Constructors

Link copied to clipboard
constructor(questionnaireResponses: List<QuestionnaireResponse>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun populateHtml(rawHtml: String): String

Populates the provided HTML template with data from the QuestionnaireResponse.