cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting the empty area in Adobe Forms

Former Member
0 Kudos

HI,

If any value for a field in the layout is not available. I need to Disable the field. And also moving the below value in that area.

For example in my form, I need to print the address in the form. my address variable are NAME1, NAME2, NAME3 will display one below one. If the is no value for NAME2 then the NAME3 value will display in the NAME2 area.

Ravi

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Ravi,

If the suggestions provided were helpful pls update the thread.

SV

Former Member
0 Kudos

Hi,

I tried as you said. But I am not able to get the result.

Former Member
0 Kudos

Ravi,

Ensure blank is passed to the field.

Check syntax of Script.

Swar.

Former Member
0 Kudos

You could solve the Problem without putting any conditions in the Layout as just make a Subform including all the fields you have mentioned and Subform Position should be TOP TO BOTTOM . Also in LAYOUT Tab set the Height as Autofit then by default whenever any field is not having any values then Space would be removed and the Next Field in the Que will move up

Former Member
0 Kudos

Hi,

I am tried with ur suggestion. Still It is not working.

Former Member
0 Kudos

hi Ravi,

I suggest you place three floating fields in the layout tab and bind them to three string variables which you declare in the Global data of the form interface.

And in the form initialization section write a simple logic to place the Name fields in those string variables as per the content of Name fields.


if (Name1 is initial )
S1 = Name 2
S2 = Name 3
else if (Name2 is initial)
S1 = Name1
S2= Name3
else if (Name3 is initial)
S1 = Name1
S2 = Name2
elseif (Name1 is initial and Name2 is initial)
S1 = Name3
elseif (Name1 is initial and Name3 is initial)
S1 = Name2
elseif (Name2 is initial and Name3 is initial)
S1 = Name1
else
S1 = Name1
S2 = Name2
S3 = Name3
endif

Hope this helps

Former Member
0 Kudos

Hi Runal,

I have lot of fields to handle the logic like NAME1,NAME2,NAME3,COUNTRY,STATE,STREET1,STREET2

STREET3,POST_CODE1.

So the logic is too difficult to handle.

Thanks,

Ravi.

Former Member
0 Kudos

Hi Ravi,

1. Remove the Condition from you Context tab.

2. In the Driver Program check for the condition and fill the value in the internal table which is passed to

the adobe form.

3. Make the subform (under which the field is added in the hierarchy view) as flowed.

4. In the script editor, Select the 'javascript' and write the script to hide the form field specifying the condition here.

for e.g

if (xfa.form.FORM.SUB_FORM.NAME1 == " ") {

xfa.form.FORM.SUB_FORM.NAME1 = "hidden";

}

NOTE: Javascript is Case sensitive and stops working immediately after the line of code where an error occurs.

Hope this helps.

Regards,

Swar.

Former Member
0 Kudos

Hi,

In context keep condition for NAME2 as not equal to space(<> Space) then if there is no value for NAME2 automatically NAME3 will be displayed in NAME2 area.I hope this might solve your problem.

Best Regards,

Jayavardhan.