Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Why same html code shows different on UI Page?

ZurichDeveloper
Tera Contributor

I'm having issues where there is a pre-emptive blank on one of the fields and the placeholder text doesn't show. Even though both have the same code. Anyone has an idea?

 

HTML Code.

<div class="row form-section form-group">
    <div class="col-sm-4 section-title-top is-required control-label">
        <label id="info_label" class="required-marker" for="mitigation">
            <p style="padding-left:3px">$[gs.getMessage("Mitigation Controls")]</p>
        </label>
    </div>
    <div class="col-sm-8">
        <textarea id="mitigation" class="form-control" rows="3" required="required" name="mitigation" placeholder="$[gs.getMessage('Provide details around the mitigation controls')]" value="" />
        <div id="mitigation_error_messages" style="display: none;">
            <div class="outputmsg_div"></div>
        </div>
    </div>
</div>
<div class="row form-section form-group">
    <div class="col-sm-4 section-title-top is-required control-label">
        <label id="info_label" class="required-marker" for="info">
            <p style="padding-left:3px">$[gs.getMessage("Additional information")]</p>
        </label>
    </div>
    <div class="col-sm-8">
        <textarea id="info" class="form-control" rows="3" required="required" name="info" placeholder="$[gs.getMessage('Additional information')]" value="" />
        <div id="notes_error_messages" style="display: none;">
            <div class="outputmsg_div"></div>
        </div>
    </div>
</div>

 

This is how it shows on the UI Page. You can see highlighted in blue that a blank is there not showing the placeholder.

ZurichDeveloper_0-1706031358863.png

 

1 REPLY 1

Maik Skoddow
Tera Patron
Tera Patron

Hi @ZurichDeveloper 

have you made sure that for the label "Provide details around the mitigation controls" a record at table sys_ui_message really exists? That blank char could represent a NULL value as a result from the missing value returned by gs.getMessage()

Maik