Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Mar 15, 2016 at 11:37 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 16, 2016 at 06:37 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 23, 2016 at 08:29 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded