[pmwiki-users] Advice on Fox form design
noskule
noskule at gmx.net
Fri Oct 31 12:31:50 CDT 2008
Graham Archer schrieb:
> Hi
>
> We have a high number of Fox based forms that are in use in our wiki.
> The problem is that many of the users don't seem to know which form is
> the correct one to use!
> It has been suggested to set up a page where the user selects, from a
> pull down list, a unique condition that meets their need - and the
> output from this will direct the user to the correct form.
>
> I have this prototype Fox form and this works fine.
>
> (:fox IformMainServices foxaction=display target={$name}
> template=Iform.Template:)
> (:foxmessage:)
> (:table border=0 cellspacing=2 cellpadding=2:)
> (:cellnr valign=top :)[+ '''This Maintenance Services (Support
> Contracts) request is for ...''' +]
> (:cell:)(:input select name=q1 value=Renewal label="Renewal of an
> Existing Contract" multiple selected=selected :)(:input select name=q1
> value=New label="New Contract Setup and Invoice" :)(:input select
> name=q1 value=CreditTerm label="Credit or Termination" :)
> (:input hidden choice {$$q1} size=35:)
> (:cell valign=middle:)(:input submit post "Select":)
> (:tableend:)
> (:foxdisplay:)
> (:foxend IformMainServices:)
>
> The template then puts a relevant message and link to the user for the
> choice they have made so that they can access the correct wikiform.
>
> However I have now been told that the choices listed above also have
> sub-conditions and in some cases sub-sub-conditions that further
> determine what wikiform should be used - and it is this part that I am
> having trouble with!
it sounds like get vars (Cookbook:HttpVariables) could help you. Try
something like this:
(:fox Test redirect={$$formname}?gVar={$$gVar}:)
(:input select formname {*$FullName} "Go to Form 1":)
(:input select formname {*$FullName} "Go to Form 2":)
(:input select formname {*$FullName} "Go to Form 3":)
(:input select gVar case1 "case 1":)
(:input select gVar case2 "case 2":)
(:input select gVar case3 "case 3":)
(:if equal {$?gVar} case1:)case 1: specific fields here
(:elseif equal {$?gVar} case2:)case 2: specific fields here
(:elseif equal {$?gVar} case3:)case 3: specific fields here
(:else:)no case defined
(:ifend:)
(:input submit post "Go":)
(:foxend Test:)
grz nos.
>
> In my mind I would like the user to choose an item from above, and
> then from that choice the next set of sub-choices are displayed, from
> which the user makes a choice again and so on until the correct
> outcome can be determined and a message/link to the correct wikiform
> be displayed via the template.
>
> I thought about doing this with ptvs - but if there are several people
> accessing the page I think that would result in user b would see part
> of a page in use at the time by user a - so I have not taken this route.
>
> I would welcome any advice on how best go about this.
>
> Thanks in advance
>
> Graham
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
More information about the pmwiki-users
mailing list