Make empty section to parse later sections correctly
In a Form with multiple sections, if one section is left empty but a later one populated,
then attempting to edit the page later using the form will result in the whole later section appearing
inside the text field of an earlier populated section.
This was happening because only section succedding the present section was checked to extract text for the present section.
It did not take care of the situation when the succedding section was empty and hide if empty attribute was set.
the issue has been fixed using a loop to look for next populated section for extracting text for every section.
Bug: T246380
Change-Id: I9009b673789d31a33fa160b821db9b74f2fe5491