Hi Sreeni,
I think the problem is already solved but i have some input for all the guys who might come over this issue and are not able to solve it:
I will focus on JavaScript because I am more into that than into FormCalc scripting.
- The main problem is that you use the value "hidden" for the presence attribute.
The solution to this problem is the following:
- Using this.presence = "hidden"; will hide the complete element on your form. Thus, all the elements which are below the hidden one are moved up.
- Using this.presence = "invisible"; will only hide the text inside the element not the element itself. Thus, the elements below stay where they are and nothing gets shifted.
So this is not really dependent on using subforms. You can hide the whole subform using this technique or only elements inside the subform.
Here a short code snippet:
- Hide the whole element and shift lower elements up:
data.MAIN.HeaderData.ADDRESS_DATA.ADDRESS_DATA_ITEM.NAME2::validate - (JavaScript, client)
if ($record.ADDRESS_DATA.NAME2.value == null || $record.ADDRESS_DATA.NAME2.value == ''){
this.presence = "hidden";
}
2. Hiding only the TEXT INSIDE the element NOT the element itself ==> no shifting of other elements:
data.MAIN.HeaderData.ADDRESS_DATA.ADDRESS_DATA_ITEM.NAME3::validate - (JavaScript, client)
if ($record.ADDRESS_DATA.NAME3.value == null || $record.ADDRESS_DATA.NAME3.value == ''){
this.presence = "invisible";
}
Regards Patrick




.jpg)







