disable a specific field from subform

Confluence User - 19 Apr, 2016

hi! i want to ask if what will be my syntax if i wanted to disables a specific field from a subform? here is a screen shot. i want to disable the textfirled fomr the subform using custom html. also i attached the code i used, when i disable a field within the form, it works, but when i use it into a subform it doesnt apply. how can i do this? thank you in advance!

 

forms;datalists;server;user;userviews

3


19 Apr, 2016
confluenceUser
confluenceUser

hi jedi, 

 

u have to put a custom html field in the form that your subform is attached, too. inspect the element and find out the specific id of the text field of the subform. 

20 Apr, 2016
confluenceUser
1
confluenceUser

Hi Jedi,

You can use the Javascript API - FormUtil to help you get the element which will help you to take care of the element whether is in subform or not.

<script>
$(function(){
    var field = FormUtil.getField("name");
    $(field).attr("disabled", "disabled");
});
</script>
07 Aug, 2017
confluenceUser
confluenceUser

Hi, I´want get the value of a field from subform , and i´m using the suggested API, but don´t work .

how can i be sure about the id of field of sub-form?

 

<script type = "text/javascript" >

$(function(){
var field = FormUtil.getField("total").val();
window.alert(field);

});

</script>

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print