addedValues Plugin

...Powerful Free! Database Expansion for Manila
logoBottle:

(1 or more words)


Get tropes here!
Click to see internals
Report bug


Maennerzeitung

sitepic_maennerzeitung.ch.jpg:
Viewable with Any Browser

Members
Join Now
Login

User Transactions

In addedValues a User Transaction is a set of variables, whose groupname is the same. In each Manila website, you can define as many groupnames as you wish. No storage is allocated for a User transaction until an end user does something to make it necessary, at that point AddedValues instantiates, or creates one unique instance of, the User transaction. The storage exists only until there is no further use for it, and it can be used to pass values of variables between forms and reports and special, administrator designated scripts, called post processors.

The form post processor is a script that has read and write access to one instance of a user transaction which it shares with all the forms and reports that are defined for this user transaction.

A User Transaction starts (is instantiated) whan a user browses a page with a user transaction form. The form is created by the beginUserTransaction macro; there are 2 further macros which create a link to a user transaction form (beginUserTransactionLink macro) and link to a popup window with the form (beginUserTransactionLinkPopup macro).

The user fills the form and submits it and the input is validated and rejected by returning the form and error messagess or accepted. If the form is accepted, the entered data is placed into the users instance of the user transaction and the form postprocessor script, if any, is called. The post processor has access to the instance and can do any processing it wishes before returning control to addedValues. Next addedvalues consults the form options and finds one of the following actions

It is this last option that makes user tranactions so powerful, because it makes possible chaining a series of forms. What's more, the postprocessor can change the action set in the form options.

pic_Forms Onsubmit1:
Click on the picure for additional configuration details.

For example, a contact form typically can be handled with one user transaction form, a report to generate the email to the site owner, a report which gives the reponse and a postprocessor to send emails. addedValues ships with the EmailForm postprocessor that does this.

A more complicated example is a multiple page survey. The technique is that first form chains to a second and so on, each modifying values to the variables of the user transaction and potentially calling a post processor to decide what is the next form to display.

addedValues ships with several useful postprocesors, and its not difficult to create new ones. All postprocessors must be explcitly authorised by the server adminstrator using the controlpanel interface.