Hub Nexus
Mis à jour

AuteurPas encore d'auteurLa reprendre

Quelque chose à améliorer ? Proposez une modification.

Soutien

Dans XForms · page 73 sur 137

Motivation

You have a very large form and your initial load times are very long. You want to be able to break a large form into multiple forms.

Method

To get the first part of a large form to load we will break the form into multiple parts and only load what appears to be the first tab of a multi-part form. When the user selects the second tab we will save all the data on the first tab and load the second tab. This way if the user want to only make a simple change to the form only the logic for a single tab needs to be loaded.

Example

We will use a series of triggers that are styled as file tabs. Each trigger will perform two actions: it will run a save submission and it will then load the next part of the form. The forms will be styled so that it will appear to the user they are just changing tabs.

Here is the sample code from each of the triggers:

appearance="minimal" class="tab2">
Part 2
ev:event="DOMActivate">
submission="save"/>
resource="edit-2.xhtml" show="replace"/>

Where this page came from

This page was imported from Wikibooks. From “XForms” on Wikibooks, by its contributors, under CC BY-SA 4.0. Changed here: set as a page; navigation and edit links left out; each image under its own licence, credited in its caption.

Nobody has written it yet — it is the source material at a new address, which is why search engines are asked to skip it and why no one earns from it. It is up for grabs: take it on, and it is yours to rewrite and to earn from.

Dans ces publicationsXForms

LanguesEnglish

Licence : CC BY-SA 4.0 · Adapté de en.wikibooks.org

1

0

0

0

Spinner Logo

commentaires

Spinner Logo
Version: 2CC0 1.0 — public domain
The runaway star that left the Tarantula Nebula
Version: 2CC0 1.0 — public domain
The Blackwell School, where segregation had no law behind it
Version: 2CC0 1.0 — public domain
The Eagle Nebula, seen in the infrared
Version: 2CC0 1.0 — public domain
The house where the Equal Rights Amendment was written
Version: 2CC0 1.0 — public domain
The Aleutians, the forgotten front of the Second World War
Version: 2CC0 1.0 — public domain
The Cosmic Cliffs are not cliffs