Tags:
create new tag
, view all tags

Question

I've been using forms to build up a database of books we're thinking about or have already ordered for our library. It's all pretty and swell except that I seem to be losing form data when one edits a topic. I have, for example,

  • A set of radio buttons for who proposed the purchase of the book
  • A set of checkboxes for who is interested in/supports the proposed purchase
  • A big (over 20) set of checkboxes for topic categories
When you first create a new book topic the data enters just fine. When you go back and re-edit the page, though, some of the item selections change in mysterious ways. The radio button for who proposed the purchase tends to jump up to the first person on the list, and the ticks in the sets of checkboxes seem to come and go in no coherent fashion.

Is it possible that this is the result of having edited the form pages several times in working out exactly what I wanted?

Potentially related topic: FormsConfusion

  • TWiki version: December 2001
  • Web server: Apache
  • Server OS: Linux 2.4
  • Web browser: Mozilla 1.0
  • Client OS: Linux and Mac OS

-- NicMcPhee - 03 Aug 2002

Answer

Could be a problm with the characters used. Could you paste your form definition table here?

-- PeterThoeny - 04 Aug 2002

If you are NOT hitting the back button, but doing Edit again to re-edit the page, you may well have a case of RefreshEditPage - the basic fix for this is quite simple, but it may be easiest to install the latest TWikiBetaRelease. Haven't seen this with Mozilla but it may happen, certainly does with Opera.

-- RichardDonkin - 04 Aug 2002

Sorry for the long silence. Just after posting the question all sorts of stuff hit the fan and the month of August mostly went away. We're back in the game now.

The links to the pages and examples in this section point to the older, broken versions. Using LucAbom's questions below we've been able to work around the problem. -- NicMcPhee - 12 Jan 2003

Richard's suggestion is almost certainly not the problem. One can leave a page alone for ages and then visit it again, hit "Edit" and the form data goes all funny.

Peter's suggestion seems plausible, as I am using lots of different characters in my form labels (including "magic" characters like '$'). The form definition table is:

Name Type Size Values Tooltip message
Title text 50   The book's title
Author text 50   The book's author(s) or editor(s)
Publisher text 50   The book's publisher
ISBN text 14   The book's ISBN number
Edition text 14   The desired edition
Publication date text 4   The date (year) the book was published
List price (in US$) text 7   The book's list price
SuggestedBy select 10   Who initially suggested this book
InterestedPeople checkbox 2   People interested in this book
SubjectCategories checkbox 3   Categories that this book falls in
Date suggested text 15 2012x05x27 The date that this was initially suggested.
Under serious consideration? radio 2 no, yes Are we seriously considering it for the library?
Ordered for library? radio 2 no, yes Have we requested that the library order a copy?
Arrived? radio 2 no, yes Once ordered, has it actually arrived?
Should this reside in the labs? radio 2 no, yes Should we check this out and keep it in our labs?

If it would help, the actual web is at:

The relevant form definitions are:

As a specific example, if you go to this book you'll see (at least today :->)

  • The interested people are "AndyLopez" and "NicMcPhee".
  • The subject categories are "Systems" and "Computer networks"
When I click "Edit", however, my form says
  • No one is interested (no check boxes are checked).
  • The only subject category is "Computer networks" ("Systems" got lost somewhere).

Any thoughts?

-- NicMcPhee - 31 Aug 2002

Had the same issue, and I found the select list which caused problems had spaces before the commas, and after the last word, ie "option , anotherOption , ThirdOption ". when changed to "option, anotherOption, ThirdOption" , it get ok. Note : I was able to see with ?raw=debug that the save went fine. that was when edit was called, that the issues happenned. I would guess the issue happens when the options are filled, ie the list parsed ... would anybody confirm that?

-- LucAbom - 09 Dec 2002

This in fact seems to be the problem. We had three fields (one select and two checkbox) where the options were coming from a table on another wiki page. Our entries in those tables used several pieces of wiki syntax both for formatting (bolding key entries) and for providing links (entries like [[TargetPage][More appropriate label]]). Based on LucAbom's questions I removed all the formatting from those selection tables, and "Lo! And Behold!" it all got better.

This is arguably a Bad Thing on two levels:

  • First, the rules and constraints on this sort of thing don't appear to be (well) documented.
  • Being able to include this sort of formatting and links in forms has real value and it would be nice to be able to do it.

Thanks to LucAbom for the comments.

-- NicMcPhee - 12 Jan 2003

Topic revision: r8 - 2003-07-27 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.