Hi,
I may be working this the wrong way, so I'd best listen to the experts before getting in too deep.
The multipage form I'm creating has different sections where the background color of each section is different to make it easier to identify the section. Currently, I am achieving this by initializing each page using the JavaScript command: this.fillColor = "234,234,239" or whatever for that page.
However, this will only color the background for subforms on that page. If the subforms found on the page do not take up the whole page, the remaining page which doesn't contain any forms is white. How would I go about making sure the rest of the page is similarly colored?
Thanks,
Graham
Solved! Go to Solution.
Views
Replies
Total Likes
Ok, so your sections are all starting on new pages, correct? If that's the case I think you're going to have to do a master page for each section (set to repeat, in case the section runs to multiple pages) and then set the color on the background of each master page.
Views
Replies
Total Likes
The easiest thing to do would be to just put an extra subform on each page that fills the page, move it to the back and change the background on that subform.
Views
Replies
Total Likes
I think what you're proposing would be to fill the empty space with another form. However, I didn't mention that this form is dynamic, and that the pages are set to follow the previous in the pagination section. The form in it's current iteration needs to be quite expandable.
Views
Replies
Total Likes
Ok, so are you wanting the background color changed based on a particular section or for the complete page? Or, to clarify, does each section always begin on a new page? If each section will start on a new page you might consider making a master page for each section that can repeat as needed for the form expansion. That way you could put a subform on the master page of each section and change it's background fill color.
Views
Replies
Total Likes
Interesting, DJ: "If each section will start on a new page you might consider making a master page for each section that can repeat as needed for the form expansion" I will look into that.
My original plan is too have the background color change based on a particular section. Is that doable? Your other option seems like the direction I'll go if doing it the other way isn't feasible.
Graham
Views
Replies
Total Likes
Look at the options for xfa.layout .....I am pretty sure there is a call that will return to you the page numbers that your object is on. I do not have access to my machine at the moment so I am going from memory.
Paul
Views
Replies
Total Likes
Are your sections flowing together throughout the form? I'm not understanding where the white space is coming in. If you place each section on it's own flowed content subform you should be able to still have the subforms flow together and then change the background color on the flowed content subform rather than the positioned content subforms.
Views
Replies
Total Likes
DJ,
Whenever a subform doesn't quite make it to the bottom of the page whenever a subform does not have "break within content" on, then the background is white.
Paul, to me, your answer is a bit cryptic. If I were to find this information, what would I do with it?
Graham
Views
Replies
Total Likes
Misread your question ....rather than setting the backround color on the page why not set the backgroound color on the subform that is expanding. Then it will not matter if it breaks across pages or not as the color will be set. Make sure you put th ecommand on the layout ready event (after the data has been mmerged and we know where the subform will be.
Paul
Views
Replies
Total Likes
Ok, so your sections are all starting on new pages, correct? If that's the case I think you're going to have to do a master page for each section (set to repeat, in case the section runs to multiple pages) and then set the color on the background of each master page.
Views
Replies
Total Likes
Thanks DJ and Paul.
DJ, I am taking your route. Creating extra master pages seems like the best thing to do.
Graham
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies