on ‎2008 Oct 29 7:33 PM
Hello,
I am a newbie trying to fix an Adobe forms issue. I am using LiveCycle Designer 7.1 and scripting using FormCalc.
I have three address fields stras, street_4, city_zip displayed one below the other. Field street_4 is not mandatory.
If street_4 is blank, the address should be displayed as follows:
stras
city_zip
If street_4 contains a value, it should be displayed as:
stras
street_4
city_zip
I created a subform wraping all the three fields. Wrote a (FormCalc, Client) script in the initialize event of street_4. If street_4 is blank, an empty space is being displayed. Any help would be greatly appreciated.
if (HasValue($) == 0)
then $.presence = "hidden"
else $.presence = "visible"
endif
Thanks,
Sreeni
Request clarification before answering.
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 solution to this problem is the following:
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:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.