Class FormHtmlHandler
java.lang.Object
sk.iway.iwcm.components.multistep_form.rest.FormHtmlHandler
Renders multi‑step form HTML for both on‑page and email contexts.
Responsibilities: - Builds step and item markup using translation keys and form settings - Transforms inputs to read‑only representations for email/PDF rendering - Collects and inlines CSS for email/PDF variants - Optionally encrypts rendered email HTML using a provided public key
-
Constructor Summary
ConstructorsConstructorDescriptionFormHtmlHandler(String formName, javax.servlet.http.HttpServletRequest request) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringappendStyle(String htmlData, String styleHtml, String emailEncoding, boolean forceTextPlain) Static helper to wrap HTML with minimal email document structure and append CSS.getCssDataLink(Integer docId, boolean forceTextPlain) Resolves CSS for email/PDF rendering given a document context.getCssDataLink(Integer docId, boolean forceTextPlain, String formSpecificCssStr) Resolves CSS for email/PDF rendering including template, editor and form‑specific CSS.Returns CSS collected during the last render.final StringReturns the last rendered form HTML without appended CSS.final StringReturns HTML wrapped with inline CSS suitable for PDF generation based on the lastsetFormHtml(FormsEntity, HttpServletRequest, Integer)call.final StringgetFormStepHtml(Long stepId, javax.servlet.http.HttpServletRequest request) Builds HTML for a single form step including its items and wrappers.final voidsetFormHtml(FormsEntity form, javax.servlet.http.HttpServletRequest request, Integer docId) Renders full multi‑step form as email‑ready HTML into the providedFormsEntity.
-
Constructor Details
-
FormHtmlHandler
-
-
Method Details
-
getFormHtmlBeforeCss
Returns the last rendered form HTML without appended CSS. Useful for plain email etc.- Returns:
- HTML content without CSS, or empty string if not available
-
getCssDataPair
Returns CSS collected during the last render.- Returns:
- pair of (inline
-