Edit Page CustomTemplate

in Edit Page → CustomTemplate

<div id="r_status_pendaftaran" class="form-group col-md-12">
	<label id="elh_mahasiswa_status_pendaftaran" for="x_status_pendaftaran" class="col-form-label ew-label">{{{caption status_pendaftaran}}}</label>
	{{{value status_pendaftaran}}}
</div>

in Edit Page → Page_Load

// Page Load event
function Page_Load() {
if (CurrentUserLevel() == 0) {
$this->status_pendaftaran->Visible = FALSE;
}
}

in browser just show this “status pendaftaran #tpx_mahasiswa_status_pendaftaran

note:

in Edit Page → Page_Load

// Page Load event
function Page_Load() {
if (CurrentUserLevel() == 0) {
$this->status_pendaftaran->ReadOnly = TRUE;
}
}

this work fine.

Help to fix this.

You should add the condition (in PHP) to your Custom Template.

<?php if (CurrentUserLevel() != 0) { ?>
<div id="r_status_pendaftaran" class="form-group-custom col-md-12 required-field">
	<label id="elh_mahasiswa_status_pendaftaran" for="x_status_pendaftaran" class="col-form-label ew-label">{{{caption status_pendaftaran}}} <?php echo Language()->phrase("FieldRequiredIndicator"); ?></label>
	{{{value status_pendaftaran}}}
</div>
<?php } ?>

yes, it work now. thank u.