[pmwiki-users] Fox submits text twice

Audun Myhra Bergwitz bergwitz at gmail.com
Thu Feb 25 16:49:28 CST 2010

I'm experimenting with Fox forms, but have run into a few problems.

I've created a form to create new pages, but the content of the form
gets posted twice to the new page. I had the problem, then it suddenly
went away, but now it's back again.

Also, posting things into an array with checkboxes doesn't seem to work.

Is it something wrong with my code? Is it a bug? Any config-stuff I need
to do?

I've updated to the latest version of pmwiki just a few days ago, but
that doesn't seem to have had any effect of any of the problems.

Any help is appreciated.


The form looks like this:
> (:if false:)
> Dayvalue: {(ftime fmt=%d)}
> Monthvalue: {(ftime fmt=%m)}
> Yearvalue: {(ftime fmt=%Y)}
> (:ifend:)
> (:title Legg til nytt event:)
> (:fox newevent template=Site.Event:)
> Sidenavn 
> (:input select foxgroup Event:)
> (:input select foxgroup Agitatoria:)
> (:input select foxgroup Oslo Queer:)
> (:input select foxgroup Linuxbrigaden:)
> (:input select foxgroup Bytopia:)
> (:input select foxgroup Dev:) [==]
> (:input text newedit size=20:)\\
> %bgcolor=white% '-Dette blir en del av webadressa og kan ikke inneholde spesialtegn (f.eks:,./:;?!)-'
> Startdato
> (:input default DStart {$:Dayvalue}:)
> (:input select name=DStart value=01:) (:input select name=DStart value=02:) (:input select name=DStart value=03:) (:input select name=DStart value=04:) (:input select name=DStart value=05:) (:input select name=DStart value=06:)
> (:input select name=DStart value=07:) (:input select name=DStart value=08:) (:input select name=DStart value=09:) (:input select name=DStart value=10:)
> (:input select name=DStart value=11:) (:input select name=DStart value=12:) (:input select name=DStart value=13:) (:input select name=DStart value=14:)
> (:input select name=DStart value=15:) (:input select name=DStart value=16:) (:input select name=DStart value=17:) (:input select name=DStart value=18:)
> (:input select name=DStart value=19:) (:input select name=DStart value=20:) (:input select name=DStart value=21:) (:input select name=DStart value=22:)
> (:input select name=DStart value=23:) (:input select name=DStart value=24:) (:input select name=DStart value=25:) (:input select name=DStart value=26:)
> (:input select name=DStart value=27:) (:input select name=DStart value=28:) (:input select name=DStart value=29:) (:input select name=DStart value=30:)
> (:input select name=DStart value=31:)
>  [==]
> (:input default MStart {$:Monthvalue}:)
> (:input select name=MStart value=01:) (:input select name=MStart value=02:) (:input select name=MStart value=03:) (:input select name=MStart value=04:) (:input select name=MStart value=05:) (:input select name=MStart value=06:)
> (:input select name=MStart value=07:) (:input select name=MStart value=08:)
> (:input select name=MStart value=09:) (:input select name=MStart value=10:)
> (:input select name=MStart value=11:) (:input select name=MStart value=12:)
>  [==]
> (:input default Ystart {$:Yearvalue}:)
> (:input select name=YStart value=2010:) (:input select name=YStart value=2011:) (:input select name=YStart value=2012:) (:input select name=YStart value=2013:) (:input select name=YStart value=2014:) (:input select name=YStart value=2015:)
>  [==] \\
> Sluttdato
> (:input default DEnd {$:Dayvalue}:)
> (:input select name=DEnd value=01:) (:input select name=DEnd value=02:) (:input select name=DEnd value=03:) (:input select name=DEnd value=04:)
> (:input select name=DEnd value=05:) (:input select name=DEnd value=06:) (:input select name=DEnd value=07:) (:input select name=DEnd value=08:)
> (:input select name=DEnd value=09:) (:input select name=DEnd value=10:) (:input select name=DEnd value=11:) (:input select name=DEnd value=12:)
> (:input select name=DEnd value=13:) (:input select name=DEnd value=14:) (:input select name=DEnd value=15:) (:input select name=DEnd value=16:)
> (:input select name=DEnd value=17:) (:input select name=DEnd value=18:) (:input select name=DEnd value=19:) (:input select name=DEnd value=20:)
> (:input select name=DEnd value=21:) (:input select name=DEnd value=22:) (:input select name=DEnd value=23:) (:input select name=DEnd value=24:)
> (:input select name=DEnd value=25:) (:input select name=DEnd value=26:) (:input select name=DEnd value=27:) (:input select name=DEnd value=28:)
> (:input select name=DEnd value=29:) (:input select name=DEnd value=30:) (:input select name=DEnd value=31:)
> [==]
> (:input default MEnd {$:Monthvalue}:)
> (:input select name=MEnd value=01:) (:input select name=MEnd value=02:)
> (:input select name=MEnd value=03:) (:input select name=MEnd value=04:)
> (:input select name=MEnd value=05:) (:input select name=MEnd value=06:)
> (:input select name=MEnd value=07:) (:input select name=MEnd value=08:)
> (:input select name=MEnd value=09:) (:input select name=MEnd value=10:)
> (:input select name=MEnd value=11:) (:input select name=MEnd value=12:)
> [==]
> (:input default YEnd {$:Yearvalue}:)
> (:input select name=YEnd value=2010:) (:input select name=YEnd value=2011:) (:input select name=YEnd value=2012:) (:input select name=YEnd value=2013:) (:input select name=YEnd value=2014:) (:input select name=YEnd value=2015:)
> %bgcolor=white%'-Sett start og slutt likt hvis du bare vil ha starttidspunkt.-'
> Starttidspunkt
> (:input default HStart 18:)
> (:input select name=HStart value=01:) (:input select name=HStart value=02:) (:input select name=HStart value=03:) (:input select name=HStart value=04:) (:input select name=HStart value=05:) (:input select name=HStart value=06:)
> (:input select name=HStart value=07:) (:input select name=HStart value=08:)
> (:input select name=HStart value=9:) (:input select name=HStart value=10:)
> (:input select name=HStart value=11:) (:input select name=HStart value=12:)
> (:input select name=HStart value=13:) (:input select name=HStart value=14:) (:input select name=HStart value=15:) (:input select name=HStart value=16:) (:input select name=HStart value=17:) (:input select name=HStart value=18:)
> (:input select name=HStart value=19:) (:input select name=HStart value=20:)
> (:input select name=HStart value=21:) (:input select name=HStart value=12:)
> (:input select name=HStart value=13:) (:input select name=HStart value=24:)
> [==]
> (:input default mStart 00:)
> (:input select name=mStart value=00:) (:input select name=mStart value=15:)
> (:input select name=mStart value=30:) (:input select name=mStart value=45:)
> [==] \\
> Slutttidspunkt
> (:input default HEnd 18:)
> (:input select name=HEnd value=01:) (:input select name=HEnd value=02:) (:input select name=HEnd value=03:) (:input select name=HEnd value=04:)
> (:input select name=HEnd value=05:) (:input select name=HEnd value=06:) (:input select name=HEnd value=07:) (:input select name=HEnd value=08:)
> (:input select name=HEnd value=09:) (:input select name=HEnd value=10:) (:input select name=HEnd value=11:) (:input select name=HEnd value=12:)
> (:input select name=HEnd value=13:) (:input select name=HEnd value=14:) (:input select name=HEnd value=15:) (:input select name=HEnd value=16:) 
> (:input select name=HEnd value=17:) (:input select name=HEnd value=18:) (:input select name=HEnd value=19:) (:input select name=HEnd value=20:)
> (:input select name=HEnd value=21:) (:input select name=HEnd value=22:) (:input select name=HEnd value=23:) (:input select name=HEnd value=24:)
> [==]
> (:input default mEnd 00:)
> (:input select name=mEnd value=00:) (:input select name=mEnd value=15:)
> (:input select name=mEnd value=30:) (:input select name=mEnd value=45:)
> Overskrift (:input text title size=20:)
> Beskrivelse\\
> %bgcolor=white%'-Dette blir teksten som synes på forsiden-'\\
> (:guibuttons:)
> (:input textarea id=text ingress cols=80 rows=7:)
> Mere utfyllende informasjon her hvis nødvendig\\
> %bgcolor=white% '-Vil synes ikke på forsiden-'\\
> (:guibuttons:)
> (:input textarea id=text tekst cols=80 rows=25:)
> '''Links:''' \\
> Facebook: 
> (:input text facebook:)
> Underskog:
> (:input text underskog:)
> '''Tags''' \\
> Agitatoria (:input checkbox tags[] "[[!Agitatoria]]":) Oslo Queer (:input checkbox tags[] "[[!OsloQueer]]":) Bytopia (:input checkbox tags[] "[[!Bytopia]]":) Motmakt (:input checkbox tags[] "[[!Motmakt]]":) Linuxbrigaden (:input checkbox tags[] "[[!Linuxbrigaden]]":)
> Hvis på forsiden (:input default forside [[!Forside]]:) (:input checkbox forside [[!Forside]]:) og i RSS-feed (:input checkbox event [[!Event]] checked=1:)
> (:input submit post "Create Page":)
> (:foxend newevent:)

and the template looks like this:

> {$$ingress}
> (:if false:)
> {$$tags[]} {$$forside} {$$event}
> EventStartDate:{$$YStart}-{$$MStart}-{$$DStart}
> EventEndDate:{$$YEnd}-{$$MEnd}-{$$DEnd}
> EventStartTime:{$$HStart}-{$$mStart}
> EventEndTime:{$$HEnd}-{$$mEnd}
> Facebook: {$$facebook}
> Underskog: {$$underskog}
> (:ifend:)
> {$$tekst}
> (:title {$$title}:)

More information about the pmwiki-users mailing list