I have a script that sets a page to presence "hidden" when a field has a specific value. The problem is, when the condition is met, the content on that page goes away, but the page stays there, blank. It seems that this should be easy, and it works for me in other forms, but I can't make my Page4 disappear. I have a footer on all pages and sometimes the form stretches to 5 pages, cause it's a flowed form and some fields expand with a lot of content. I tried renaming Page4 for "Page4X" and adjusted the scripts accordingly, but it made no difference. So I end up with a blank 5th page (the "hidden" Page4) with "Page 5 of 5" in the footer. I just need the 5th page to disappear completely so the page counter can just say "4 of 4" on the last page that actually has content. Any help is appreciated, thanks.
Page4.presence = "hidden";