Multipage Form
Multipage Form
I have a rather complex form with several tables and controls. I can't fit it all on a single page and still have a usable UI. Is it possible to have forms that span more than one page?
- DrewJensen
- Volunteer
- Posts: 1734
- Joined: Sat Oct 06, 2007 9:01 pm
- Location: Cumberland, MD - USA
Re: Multipage Form
There is maybe a long answer and a short answer to that question.
The short answer is - NO.
The long answer is that with scripts you can:
The short answer is - NO.
The long answer is that with scripts you can:
- achieve the equivalent of a multi-panel in a form
Use data aware controls in a dialog, which does have a mulit-page control to achieve it.
Build you applications UI will multiple pop-up forms
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
-
- Posts: 1
- Joined: Mon Dec 31, 2007 3:35 pm
Re: Multipage Form
Is this the same as the Tab page control in Access? I noticed it seemed to be missing from the form toolbox - will it be included in the features in future? 

- DrewJensen
- Volunteer
- Posts: 1734
- Joined: Sat Oct 06, 2007 9:01 pm
- Location: Cumberland, MD - USA
Re: Multipage Form
There is a request for a tabbed control but at this point I don't believe it is in the development queue.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Re: Multipage Form
I did this in one form without subforms with three buttons and three 'tabs'. Each button hides some control's and shows other controls.
Code: Select all
sub showadressenbezoekadres
oForm=ThisComponent.Drawpage.Forms.getByName("MainForm")
ThisComponent.CurrentController.getControl(oForm.getByName("bezoekadres")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("bezoekpostcode")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("bezoekplaats")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("bezoekprovincie")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("bezoekland")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("labelbezoekadres")).setVisible(true)
end sub
sub hideadressenbezoekadres
oForm=ThisComponent.Drawpage.Forms.getByName("MainForm")
ThisComponent.CurrentController.getControl(oForm.getByName("bezoekadres")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("bezoekpostcode")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("bezoekplaats")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("bezoekprovincie")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("bezoekland")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("labelbezoekadres")).setVisible(false)
end sub
sub showadressenpostadres
oForm=ThisComponent.Drawpage.Forms.getByName("MainForm")
ThisComponent.CurrentController.getControl(oForm.getByName("postadres")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("postpostcode")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("postplaats")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("postprovincie")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("postland")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("labelpostadres")).setVisible(true)
end sub
sub hideadressenpostadres
oForm=ThisComponent.Drawpage.Forms.getByName("MainForm")
ThisComponent.CurrentController.getControl(oForm.getByName("postadres")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("postpostcode")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("postplaats")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("postprovincie")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("postland")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("labelpostadres")).setVisible(false)
end sub
sub showadressenfactuuradres
oForm=ThisComponent.Drawpage.Forms.getByName("MainForm")
ThisComponent.CurrentController.getControl(oForm.getByName("factuuradres")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("factuurpostcode")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("factuurplaats")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("factuurprovincie")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("factuurland")).setVisible(true)
ThisComponent.CurrentController.getControl(oForm.getByName("labelfactuuradres")).setVisible(true)
end sub
sub hideadressenfactuuradres
oForm=ThisComponent.Drawpage.Forms.getByName("MainForm")
ThisComponent.CurrentController.getControl(oForm.getByName("factuuradres")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("factuurpostcode")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("factuurplaats")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("factuurprovincie")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("factuurland")).setVisible(false)
ThisComponent.CurrentController.getControl(oForm.getByName("labelfactuuradres")).setVisible(false)
end sub
sub bezoekadres
hideadressenfactuuradres
hideadressenpostadres
showadressenbezoekadres
end sub
sub factuuradres
hideadressenbezoekadres
hideadressenpostadres
showadressenfactuuradres
end sub
sub postadres
hideadressenbezoekadres
hideadressenfactuuradres
showadressenpostadres
end sub
Re: Multipage Form
Thanks for this code. It is very useful for me! It works great!
For subforms I used the code below. You put only your names of MainForm, SubForm and ControlName.

For subforms I used the code below. You put only your names of MainForm, SubForm and ControlName.
Code: Select all
sub showfilter
oForm=ThisComponent.Drawpage.Forms.getByName("MainForm").getByName("SubForm")
ThisComponent.CurrentController.getControl(oForm.getByName("ControlName")).setVisible(false)
end sub
OOo 3.1.1 on Ubuntu 9.10