cancel
Showing results for 
Search instead for 
Did you mean: 

Fields do not move up when its preceding field is blank.

Former Member
0 Kudos

Hi,

I have a  "positioned" subform to display Address.  This Address is of 3 lines one below the other ( in the center of the page).

                     Line1

                     Line2

                     Line3

This entire subform is embedded in a "flowed" subform.


Line 2 will be blank in most of the cases. If Line 2 is blank, I need to move Line 3 up. I have a code in place for Line2 shown below.

if (this.rawValue == null || this.rawValue == ''){

     this.presence = "hidden";

}

But this does'nt move the Line 3 up.  I don't see any other options to make this work.

Appreciate help on this.

Thanks,

Pavan

Accepted Solutions (1)

Accepted Solutions (1)

rohit_singhal
Active Contributor

Hi Pavan,

Did you try using $(this).hide() or this.style.display="none"

Both would remove the element that you are trying to hide and move the remaining elements up.

If the above does not work you can try using $.remove() function.

Best Regards,

Rohit

Answers (2)

Answers (2)

varun_vadnala3
Active Participant
0 Kudos

Pavan,

1. Script doesnot work properly incase if its not written correctly.

2. Try with table. Insert a table remove the header and footer. Have three rows and one column. decrease the height of each row. In each row bind line1, in second row bind line 2 and in third row bind line 3.

By default the line 3 moves up if line 2 is empty.

silver1
Explorer
0 Kudos

Try changing the "positioned" address subform to "flowed". Then create 3 "positioned" subforms inside for each line. So if line 2 subform is empty, line 3 subform will move up.

Regards,

Silver