From: Martin Stannard Date: 2003-12-03T11:34:57+09:00 Subject: multipart forms and cgi Hi, I'm having some trouble getting hidden fields to appear in multipart forms working using cgi and mod_ruby. ruby 1.8.1 (2003-10-31) [i686-linux] apache 2.0.40 mod_ruby 1.1.1 I'm creating a multipart form using cgi.multipart_form("sub.rhtml") { ... } to generate the following html:


Main Menu Mpeg:

but when I try to retrieve the value of the field like this: cgi.params['formname'][0] there doesn't seem to be formname parameter. This is the CGI.escape(cgi.inspect) string from the webbrowser (sorry about the guff - the browser wouldn't display the straight inspected output): %23%3CCGI%3A0x84bc59c+%40cookies%3D%7B%7D%2C+%40output_cookies%3Dnil%2C+%40multipart%3Dtrue%2C+%40output_hidden%3Dnil%2C+%40params%3D%7B%22privacy%22%3D%3E%5B%23%3CStringIO%3A0x84bc358%3E%5D%7D%3E I can see the privacy StringIO in there but not 'formname'. Hidden fields seem to work on normal forms. Any ideas? On a related note the std-lib documentation has a multipart? method for CGI:QueryExtension but this doesn't seem to be in the version of cgi I've got. Is there a later version? regards, Martin