Fox Multiple Choice Voting

Next meeting time proposal

Mon 11:00Tue 9:00Thu 10:00Thu 15:00Fri 11:00
 John John  
 PaulPaul   
Hilary   Hilary 
   FrancisFrancis 
   Scott  
pkhg     
mam mam mam 
  Test   
  Test2Test2  
 VinceVinceVince  
  Paul   
aleks  aleks  
 HansHans   
test     
 FritzFritz Fritz 
 Bill    
      
 Greg    
 Rat    
 Silly Silly  
 JDJD   
 fgsdgs    
toto     

Please check the boxes you can manage, fill in your name, and click Submit.

Mon 11:00 Tue 9:00 Thu 10:00 Thu 15:00 Fri 11:00 Name

Wiki Source Code

This form uses check boxes to post the user's name in a table listing several options. The options are defined at the top in page text variables. A line delete button allows the user to delete the entry. A custom conditional is used to check author name against the author field. It is defined like this in config.php:

# add conditional markup: (:if author AUTHORNAME:)
$Conditions['author'] = "\$GLOBALS['Author']==\$condparm";

Form wiki code Note some lines are wrapped for easier reading!

!!Next meeting time proposal
(:Option1: Mon 11:00 :)
(:Option2: Tue 9:00 :)
(:Option3: Thu 10:00 :)
(:Option4: Thu 15:00 :)
(:Option5: Fri 11:00 :)

||width=100% border=0
||!{$:Option1}||!{$:Option2} ||!{$:Option3} ||!{$:Option4} ||!{$:Option5} ||
(:foxappend form1:)

Please  check the boxes you can manage, fill in your name, and click Submit.
(:fox form1 #append:)(:input default vote "":)
(:input hidden foxfields vote1,vote2,vote3,vote4,vote5 :)
(:foxtemplate "||{$$vote1} ||{$$vote2} ||{$$vote3} ||{$$vote4} ||{$$vote5} ||
(:if author {$$author}:){[foxdelline]}(:if:) ||":)
||width=100% 
||{$:Option1} (:input checkbox vote1 {$$author}:) ||{$:Option2} (:input checkbox vote2 {$$author}:) ||
{$:Option3} (:input checkbox vote3 {$$author}:) ||{$:Option4} (:input checkbox vote4 {$$author}:) ||
{$:Option5} (:input checkbox vote5 {$$author}:)  ||Name (:input text author {$Author} size=15:) ||
(:input submit post "Submit":) ||
(:foxend form1:)