I would display something like this on the frontend:
Do you like to fish? - Yes - No
After the user selects the checkbox in front of option "Yes" and submits the form, internally the field "count" of that particular pollanswer is updated by 1. Afterwards, when the page show the results, suddenly the voted pollanswer ended up at the bottom of the list:
Do you like to fish? - No - Yes
When I open the editwizard of that particular pollanswer it shows the related options also in that changed order - because probably the same technique is used by MMBase.
So to circumvent seemingly randomly sorted pollanswer (I couldn't detect changes in the pos-field of the used posrels - they always stay at -1) I added a field "priority" to the pollanswer-builders.
On the frontend I now used <mm:relatednodes role="posrel" type="pollanswer" orderby="priority">
In the editwizards I now used <list role="posrel" destination="pollanswer" orderby="priority" minoccurs="2">
So here's the problem:
After adding a new pollanswer it's priority-field is by default set to 0 by the editwizard. Because of this the editwizard suddenly displays "up" and "down" buttons after each pollanswer in the list. But since all pollanswers have the same priority those buttons are useless and don't change any order. Somehow if I change in the MMBase editor the priority value of one of the two builders to e.g. 1, then the buttons do work and known how to change the order of things. I can understand this reason: when both builders have a priority of 0 MMbase doesn't know whether to increase the priority of the first builder of decrease the priority of the 2nd builder.
So: is there a way to control the order of the list with the priority field with "up" and "down" controls WITHOUT having the user type in priorityvalues in manually? Somehow the editwizards definition has to increase the default priorityvalue with each new item or something, but is that possible?
Sorry for the long text :D
-- Met vriendelijke groet, Ted Vinke
First8 BV Groenestraat 294 6531 JC Nijmegen [EMAIL PROTECTED]
