From: David R. <da...@ha...> - 2012-03-10 19:02:00
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Good day, Before upgrading from Semantic Forms 2.2.1 to 2.4.1, I had the following (exemplary) autoedit code to allow people to RSVP to an event by just clicking a link within the respective page which worked fine: {{#autoedit:form=Event |target=PeaceMissions 28C3 |link text=Add me |query string=Event[attendees]={{#arraymap: {{#ask:[[PeaceMissions 28C3]] |?Has attendee |format=list |limit=20 |headers=hide |link=none |offset=0 }} |,|x|{{#sub:x|5|0}} }}, {{#nickname:}} | reload }} Now, after the upgrade to 2.4.1, I've encountered two kinds of problems. The first being that I had to add "mainlabel=-" for the above code to work (which is acceptable ;) ) and the second that now suddenly two values are being emptied at every form update. What happens is : − |announce=yes + |announce= − |u19=yes + |u19= I have another field in my form and template that is called "recurring" that is being left untouched. Those three fields are defined as follows in the Form:Event: | {{{field|recurring|default=no|mandatory}}} | {{{field|u19|input type=radiobutton|property=Is U19|default=no|mandatory}}} | {{{field|announce|input type=radiobutton|property=Do Announce|default=no|mandatory}}} and as properties: https://wiki.hackerspace.lu/wiki/Property:Is_Recurring https://wiki.hackerspace.lu/wiki/Property:Is_U19 https://wiki.hackerspace.lu/wiki/Property:Do_Announce As a test, I modified the "recurring" field to include the property value and once I used autoedit on an event page again, the recurring value - that had previously been left untouched - was suddenly moved (though it retained its value at least, unlike those other two fields) Now, a potential solution (or rather a hack) would be to query the values for those two properties and then resubmit them with every autoedit: {{#autoedit:form=Event |target=PeaceMissions 28C3 |link text=Do stuff (and reload) |query string=Event[attendees]={{#arraymap: {{#ask:[[PeaceMissions 28C3]] |?Has attendee |format=list |limit=20 |headers=hide |link=none |offset=0 |mainlabel=- }} |,|x|{{#sub:x|5|0}} }}, {{#nickname:}} |query string=Event[announce]={{#show: PeaceMissions 28C3 | ?Do Announce |link=none | offset=0}}|query string=Event[u19]={{#show: PeaceMissions 28C3 | ?Is U19 |link=none | offset=0}} | reload }} But I don't really see why that should be necessary, since all other values are simply left alone when autoediting a page. Can anyone give me a helping hand here? Cheers, David - -- HaxoGreen 2012 - the Hackers' Summercamp in Luxembourg July 26nd till July 29th 2012, in Dudelange, Luxembourg Call for Proposals: http://www.haxogreen.lu T: +352 691 44 23 24 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPW6CfAAoJEPnXy9KJuhQZqzUP/jW0DpQP/TWelzIyxEqRvytJ ZWZ7J3vrZkiKbD0b8n23ETR01iPyfad/NmSY1dFVNXzt4AMpTKJil7mSPc4DnZyM 0FC3QLndKEbr7IlIC3ahNX4rCGnv2PBW96RAtj1X65Vr2MBpFFtkM1BurVe1Gno6 wyoIYU/8zJloDGLz5EWaeTf4yeLAK5q9p+3c97VffdNyjw/WQM9JNODcAoM35k2d ZDU7Q1m4YcFVf0MHSD354C4fSfnSMM6EqHUgp2sC2VOWiU4fNQK/OlctshPGg5zj sNtCXUcS4VOn3fFFrx0YYdmAfpT+kNl/vdfyC4uKnlVG9ik+VingKkCuMmWtvD8I MAtDiiCPR/6tFBCWo1t0ptDHrxhMBeq4JnK6BBQkXcflIPBhG+BgJoTg2XOsNQiv zd/KwxhFv3YSeoN1b5GmLFlRoI/XrBYoxuPEtGEx+Tauem1D5tuIWA9mPhgbMRXU P8x72Or1SdApqIsUo7VHzSba5dMKJN+eLKhrEnjDZ3K/TFbRFLvL8eUi/SclD4KO DtfrK33fvE4zkMrfHf8U3Pti0Q7yoDvi8OB+iKG+vUEYU05h8j2vLJMkYLenr8i9 latvynQLM2rShtMJ7UdSh6/V1am64sAa2buaGcaYuw4+Z5Uejkoj4cjrCFXJ6v0+ YuStFLNuus6Mq9ySkvI4 =HtVg -----END PGP SIGNATURE----- |