Forum Moderators: open

Message Too Old, No Replies

html form field help

repeat values

         

lesabeyta

2:11 pm on May 25, 2004 (gmt 0)



i have created a form for data entry. there are 10 text fields in the form that go to a database. Of the 10, 1 of the fields values will repeat for a specific batch of data slips i am entering. ie, i have 100 leads slips and the "source" (field name) on the first fifty is "fern" and the the second fifty the source is "pine". How can i set the source field so that once i input "fern" once, that variable keeps repeating for each of the fifty until i change the value to "pine"? This would save considerably my keystrokes as i pay by entry. Yes, i have the options set, however, i am trying to keep from redoing that keystroke.

Thank you much.

Les Abeyta
<snip>

[edited by: BlobFisk at 2:28 pm (utc) on May 25, 2004]
[edit reason] Sorry, no sigs - please review the TOS. [/edit]

tedster

8:23 am on May 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know of a pure HTML approach to this - doubt that there is one.

I'd suggest asking over in our Javascript Forum [webmasterworld.com]. Since we're talking paid data entry you can probably ensure that js is turned on in every case.

zollerwagner

8:11 am on May 29, 2004 (gmt 0)

10+ Year Member



Hmm. If you're connecting to a database, then you should be using some scripting language, aren't you? I'd use PHP, but there are other options.

When you load the form, you could query the DB and have the PHP fill in the form field for you automatically, basing that entry on what the DB says has already been done. This would be simple if you can assume that you are going down the list sequentially.

(I'd guess that if you get any inputs out of order, this could be a terrible mess.)

HTH

zollerwagner

6:58 pm on May 29, 2004 (gmt 0)

10+ Year Member



Thinking about this again, I think you'd want to display the number and source, but probably not in a form field. Scripting can do that easily.

Databases can be designed to automatically increment a particular field 1, 2, 3, .... The script, though, would have to do a simple test to decide what source to enter, depending on the entry number.

I'd think you'll also need a way for people to go back to previous entries to edit or review what they did. To do that, you may be back to entering the number in a "go to item #" field or using arrows to run up or down the entries. (I'd probably do both.)

If you're paying by the number of key clicks on the keyboard, this will add to the clicks, but you really do want good data, right?