Form field label and value text rendering
Zenoti's mobile form renderer automatically corrects character-encoding issues and removes HTML markup from form field labels and option values before displaying them. This article explains how the rendering pipeline works and what staff can expect when viewing forms on mobile devices.
Audience: Front desk staff and providers who view and complete forms in Zenoti's mobile app.
On this page
- Before you begin
- How the rendering pipeline works
- What the repair and decoding steps do
- How field values are handled
- Tips
- Troubleshooting
- Related articles
Before you begin
- Your organization must have at least one active form with field labels or option values configured.
- No permissions are required to view form field labels β the rendering pipeline runs automatically whenever a form is displayed on a mobile device.
- The encoding repair and HTML-stripping steps apply to all form types that display in the mobile form renderer. No administrator configuration is needed to enable them.
How the rendering pipeline works
When the mobile renderer loads a form, it processes every field label, option value, and resolved field value through a two-stage pipeline before displaying the text:
- Encoding repair β The renderer checks whether the string contains character sequences that indicate the payload was decoded using the wrong character set. If so, it repairs the string so that characters display correctly.
- Entity decoding and markup stripping β After encoding repair, the renderer removes HTML entities (such as
&and') and strips light HTML markup (such as<b>β¦</b>) so that plain text appears in the field label rather than raw markup.
The two stages always run in this order. A string that passes through both stages unchanged is not altered β correctly encoded plain text is returned exactly as received.
What the repair and decoding steps do
Encoding repair
Some form payloads contain UTF-8 text that was decoded as Latin-1 during an earlier processing step. This produces visible artifacts in labels β for example, a non-breaking space intended to separate words can appear as Γ instead of the intended character.
The mobile renderer detects this pattern and corrects it by re-encoding the affected string to Latin-1 bytes and then decoding the result as UTF-8. After repair, the label displays the characters that were originally intended.
Strings that do not contain these byte-level artifacts are returned unchanged. The repair step never alters a correctly encoded string.
Entity decoding and markup stripping
After encoding repair, the renderer decodes standard HTML entities and removes inline HTML markup from label and option strings. For example:
&becomes&'becomes'<b>Sensitive skin</b>becomesSensitive skin
The result is plain text suitable for display in a standard text widget. Staff see the intended label content without any markup characters.
Note: This step applies to field labels and option values in all form types rendered on mobile. It does not affect content inside rich-text components that are designed to render formatted output.
Worked example
A dropdown field in a skin-consultation form has the following option value as stored in the form payload:
SensitiveΓ & Dry
After encoding repair, the string becomes:
Sensitive & Dry
After entity decoding, the string becomes:
Sensitive & Dry
The label displays correctly in the mobile renderer without any action from staff or administrators.
How field values are handled
The same plain-text conversion that applies to field labels and option values also applies to resolved field values when those values are strings. This means that if a macro-resolved field value contains HTML entities or mojibake sequences, the renderer repairs and decodes the value before displaying it.
Non-string values β including numbers, yes/no values, nested data structures, and lists β pass through the pipeline unchanged. The renderer applies plain-text conversion only where the value type is a string.
Note: The rendering pipeline operates on the displayed value only. Stored form data is not modified by the repair process.
Tips
- If a field label or option value looks correct on the web but displays garbled characters in the mobile renderer, the encoding repair step will resolve this automatically when the form is next opened on a mobile device. No administrator action is needed.
- Staff do not need to report unexpected symbols such as
Γor&appearing in labels β these are resolved by the rendering pipeline on each form load. - If you notice that a field label is missing its intended formatting (for example, bold text in an option name is no longer bold), this is expected. The renderer strips HTML markup to show plain text. To present formatted option names, use the form builder to structure content into separate fields or panels rather than relying on inline HTML.
Troubleshooting
A field label still shows garbled characters after opening the form.
The encoding repair step targets a specific mojibake pattern caused by UTF-8 content decoded as Latin-1. If the characters appearing in the label do not match this pattern β for example, the source data contains a different encoding mismatch β the repair step will not alter the string. Contact your administrator to review the original form payload.
An option value shows the text <b> or </b> rather than formatted text.
This is the expected result. The renderer strips light HTML markup and shows plain text. If the form was built with inline HTML tags intended to create bold option names, those tags will be removed. Update the form in the form builder to use the label or description fields for any additional context you want to display alongside an option.
A resolved field value displays HTML entities such as & in the form on mobile.
Confirm that the field value is a string type. The entity-decoding step applies only to string values. If the value is stored as a number or structured data, it passes through the pipeline unchanged. If the value is a string and entities are still visible, open the form again β the pipeline runs on each form load and does not cache the pre-decoded text.
Form labels appear correctly in the mobile renderer but incorrectly in the web form view.
The encoding repair and entity-decoding pipeline described in this article applies specifically to the mobile form renderer. The web form renderer uses a separate rendering path. If labels appear incorrectly in the web view, contact your administrator.