Here's a proc that uses ns_getform, and returns the form values to a supplied array name:

qf_get_inputs_as_array

See: http://fisheye.openacs.org/browse/OpenACS/openacs-4/packages/spreadsheet/tcl/form-procs.tcl?r=1.27

It uses ad_quotehtml from OpenACS and includes some basic protections.

cheers,

Torben


Alexey Pechnikov wrote:
2011/5/11 Gustaf Neumann <neum...@wu.ac.at>:
why not using ns_getform? like e.g.:

===============================================================form-action.tcl
foreach {att value} [ns_set array [ns_getform]] {
   lappend a($att) $value
}
ns_return 200 text/plain "keys: [array names a]\nkeys+values: [array get a]"

With additional check for counters and transpose this code will be not
so trivial.
But I think that getting set of records from form may be simple
operation in AOL.
How about editing and saving a set of database records?... And how about
parsing CSV format on client (javascript) and packet import?... All
these operations
can be realised easy with ns_querygetarray function.



--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to