Closed
Bug 58875
Opened 25 years ago
Closed 25 years ago
Prefill Forms does't work with SELECT-tag
Categories
(Toolkit :: Form Manager, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: Masato, Assigned: morse)
References
Details
Attachments
(1 file)
|
9.33 KB,
patch
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.10 i686)
BuildID: 20001027
Prefill Forms ignore the SELECT-tag (multi-choice boxes)
Reproducible: Always
Steps to Reproduce:
1. fill aout a form (which have multi-choice boxes)
2. save form date
3. restart Mozilla
4. prefill form
Actual Results: the multi-choice boxes won't be changed to the values what
are saved.
| Assignee | ||
Comment 1•25 years ago
|
||
That's not a bug -- it was done by design. The form manager prefill command
does indeed prefill information into select boxes. But the capture command does
not attempt to capture any such data.
The reason I did that was as follows. Suppose you have previously saved a form
containing an <input> tag for "state" and you wrote "CA". On some future form
you encounter a <select> tag for "state". At this point I go through the list
of <option> tags looking for "CA". The matching <option> tag can have any of
the followig forms:
<option value="CA">California</option>
<option value="California">CA</option>
<option>CA</option>
so its easy to check in the various places for the match when prefilling. But
when capturing it's not clear which value to capture.
Well that was the motivation as to why I designed it the way that I did. I
suppose I could enhance the algorithm and capture both values, marking one as a
synonym for the other. And I could check if either of the two values is already
captured, in which case I wouldn't create a new value but simply add a synomym.
So I'll keep this bug report open as a reminder of a possible enhancement to the
way form-manager works.
BTW, the only reason we have "synonym" values in the forms-manager dialog is for
<select> tags.
Comment 2•25 years ago
|
||
Confirming to get this off the unconfirmed rader. This bug might be
marked REMIND.
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Summary: Prefill Forms does't work with SELECT-tag → [x]Prefill Forms does't work with SELECT-tag
The easiest way would be just take the 'value="..."'
<option>CA</option> is equal to <option value="CA">CA</option>
Forms usually keeps the same for a longer time, so it shouldn't be a problem.
I have 2 additional suggestions:
1. a "fill this form atomatically on entering site" option. (not by default)
2. Profiles/Templates (for professionel search. eg:DejaNews)
it easier then select the prefills for each texfield itself.
- additional choices like "keep/make field empty" & "keep/make field empty
and activate it (put cursor in it)"
| Assignee | ||
Updated•25 years ago
|
Summary: [x]Prefill Forms does't work with SELECT-tag → Prefill Forms does't work with SELECT-tag
Whiteboard: [x]
| Assignee | ||
Comment 5•25 years ago
|
||
Attaching patch that fixes the problem. Basically it involves adding a test for
a select element as well as an input element when capturing form data.
But this occurs in two places -- once when the user forces form-capture from the
menu and the other when the form is submitted. So this resulted in duplicating
the existing code that processes input elements as well as the new code that
processes select elements. Therefore I took this opportunity to factor out the
duplicated code and making it into a separate routine.
| Assignee | ||
Comment 6•25 years ago
|
||
| Assignee | ||
Updated•25 years ago
|
Whiteboard: [x] → [w]
Comment 8•25 years ago
|
||
sr=alecf
| Assignee | ||
Comment 9•25 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•25 years ago
|
Whiteboard: [w]
Comment 10•25 years ago
|
||
Verified Win build 2001031220
Verified Linux build 2001031308
Verified Mac build 2001031309
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•