1
0
-1

Hi,

I want to remove the whole field/attritbute of that particular part of my subform on this form without removing it original form as it can be used for other part, so why my subform become like this? Not just the textfield but including the label I want it to be removed.

here are my codes that i used on Custom HTML below subform

<script>
$(function(){
var field = FormUtil.getField("id_mobile_number");
$(field).attr("disabled", "disabled");
var field = FormUtil.getField("id_position");
$(field).remove();
var field = FormUtil.getField("id_explanation");
$(field).remove();
});
</script>

I've try using this method but doesn't work either

$(id_explanation).remove(); // or
var field = FormUtil.getField("id_explanation");
$(field).hide(); // or
$(id_explanation).hide();

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi, your code seems to be just hiding the input field. If you want to hide the label you should also do that. Alternatively, instead of manually hiding fields with code why not create separate forms with the appropriate fields.

        CommentAdd your comment...