SID-01193: TWiki Form Selectbox strange behaviour
| Status: |
Answered |
TWiki version: |
4.3.2 |
Perl version: |
5.10 |
| Category: |
CategoryForms |
Server OS: |
Debian |
Last update: |
14 years ago |
Hi, I got a very weird behaviour with forms. Having a form with different select fields. The values for the select fields are in own topics (which is working fine). When deleting a value from the "possible value list" for a select field I got two different actions in a topic where this value is selected (in the form). If it's type:select, size:1 the fields gets blanked with the next edit. If it's type:select, size: something greater than 1 after editing the value is kept, although it is no longer in the list of possible values for that select field.
Shouldn't the size have no effect on the value? And shouldn't a no longer listed value be removed from the forms which uses it?
Thanks a lot, Carla
--
CarlaReitzenstein - 2011-06-01
Discussion and Answer
This looks like a bug. Could you please file a report at
TWikibug:WebHome
with details?
--
PeterThoeny - 2011-06-01
Yes of course, thanks for the answer.
Cheers, Carla
--
CarlaReitzenstein - 2011-06-07
It's Report
6746
--
CarlaReitzenstein - 2011-06-07
Hello,
I believe the select in the TWiki form implementation is missing a parameter to define if the value is restricted to the list or not. Currently it is restricted by default, so IMHO the behavior described here is not that unexpected. There is no way for the select list to get and show a value that is not in its list, so when saving is normal the value will get blanked.
A workaround is to use an HTML form to edit the data and pass the current field value as a parameter to be concatenated at the beginning to the options list of the HTML select.
You could also try a formatted SEARCH in the form definition to ensure all the current values in the topics are included as options in the list (using also LISTUNIQUE from
SpreadSheetPlugin).
--
EnriqueCadalso - 2011-06-07
Hi Enrique,
blanking a value not in the select list when save is what I want/expect. The problem is, that this is not happening if the size is set to a value greater than 1.
and I have no idea why the size is effecting this ...
Cheers, Carla
--
CarlaReitzenstein - 2011-06-08
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.