Multipage Form

Creating and using forms
Post Reply
uliggett
Posts: 3
Joined: Tue Dec 04, 2007 5:11 pm

Multipage Form

Post by uliggett »

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?
User avatar
DrewJensen
Volunteer
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: Multipage Form

Post by DrewJensen »

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:
  • 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
So if you are looking only for the drag-drop and set a property for which page to display solution - then unfortunately the short answer is the most accurate.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
griffiths958
Posts: 1
Joined: Mon Dec 31, 2007 3:35 pm

Re: Multipage Form

Post by griffiths958 »

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? :?:
User avatar
DrewJensen
Volunteer
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: Multipage Form

Post by DrewJensen »

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
User avatar
bvdbos
Posts: 11
Joined: Sun Jul 13, 2008 9:07 am
Location: Helmond, Netherlands

Re: Multipage Form

Post by bvdbos »

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
User avatar
kububa
Posts: 14
Joined: Mon Feb 25, 2008 3:01 pm

Re: Multipage Form

Post by kububa »

Thanks for this code. It is very useful for me! It works great! :D
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
aremania
Posts: 1
Joined: Tue Jul 29, 2008 4:31 am

Re: Multipage Form

Post by aremania »

thanks
OOo 2.3.X on Ubuntu 7.x
Post Reply