Gossamer Forum
Home : General : Perl Programming :

Maximum number of input fields?

Quote Reply
Maximum number of input fields?
I was playing around with a script today and found that after adding a whole slew of select fields, radio fields and text fields, my computer was out of memory. At first it wouldn't display them all and then the whole thing just crashed.

It's not a really major problem for the script I was working on, because I can back off the number of fields. But it got me to wondering if there is a practical limit to the number of fields one can have on a form.

Anybody else max out like I did?

------------------
JPD





Quote Reply
Re: Maximum number of input fields? In reply to
Carol,

Have you tried it with hidden fields? If hidden fields don't affect the problem then you can just do your multi-page form and feed the data into hiddens on subsequent pages as you go. Who wants to fill in 200 fields on one page anyway? Smile

But if it *doesn't* then you're kinda back to square one, unless you feed each batch of data into a/the file as you go or somefing. Sorry, I'm no pro, I just thought you might want to try the hidden fields before you go any further...

adam
Quote Reply
Re: Maximum number of input fields? In reply to
How much RAM do you have? Smile

Pasha

------------------
webmaster@find.virtualave.net
http://find.virtualave.net
Quote Reply
Re: Maximum number of input fields? In reply to
128M -- Seems like a lot to me. I was running Xitami server software, a text editor and Netscape.


------------------
JPD





Quote Reply
Re: Maximum number of input fields? In reply to
Well, your RAM is enough. I don't know what could it be. My Netscape 4.5 on Win98 with 48 megs of RAM can hold 1000+ pages of any stuff without crashing. Sure it's slow, but it doesn't crash on me Smile
Can it be other programs running in the background?

You running Linux, right?


Regards,

Pasha

------------------
webmaster@find.virtualave.net
http://find.virtualave.net
Quote Reply
Re: Maximum number of input fields? In reply to
Carol, (your reputation precedes you ma'am Smile)

I've had problems with large forms too, although not exactly the same as yours. I find that if I come across a large form when I'm browsing that the page tends to hang for an unreasonably long time. I *have* had crashes, but I've never associated them with the forms. Thinking about it now though, it seems to me that it may have been the cause.

It can happen while creating a page (Composer), browsing it on the net or testing it locally (Apache), so I would presume it's a browser bug, but I'm not sure what you use so I may be wrong. I'm running NC 4.5 (4.0 had the same problem)/ 128M RAM / Win95 if it's any help. I couldn't comment on IE because I tend to avoid it wherever possible.

Maybe you should have a poke around the W3C or Netscape, there might be bug reports...

ttfn,
adam
Quote Reply
Re: Maximum number of input fields? In reply to
Thanks for the replies.

It doesn't seem to be a function of the size of the page, since I have loaded in much larger pages. But it does seem to have something to do with the number of inputs.

(BTW, I was running it on my home computer, using Win98 and Xitami.)

Another clue to this was that I was playing with Alex's "DB Definition Generator" and noticed that he had a limit to being able to define 50 fields for DBMan. I changed it so it had places for 100 fields. Result: Crash!

Alex was smart enough to include some error checking in the script which would not accept a number greater than 50 (which I proceeded to eliminate Smile ). I'm thinking that maybe he experienced something similar which caused him to limit the number of possible fields.

My concern is that I have a client who wants a database with more than 200 fields. I may have to break the form up into several pages in order for it to work. I'd kinda like to know about it now, rather than after I get it all together.




------------------
JPD





Quote Reply
Re: Maximum number of input fields? In reply to
Thanks for the suggestion. I don't think the hidden fields cause a problem, so that might be the way to go.

I hear ya about filling in 200+ fields on a page. But you know what they say -- "The client is always right!" Smile

I may be back once she gets her field list together and I know just how many more than 200 fields she's going to need. Smile

Thanks again for the input. It has helped a bunch.


------------------
JPD