Skip to content

Conversation

@remorse
Copy link

@remorse remorse commented Mar 28, 2012

Hi! This should fix "issue 1". I'm sure there is a more succinct way to do it, but I'm not really clever enough to see it...

@pmh1wheel
Copy link
Owner

That's fine if the empty parameter is guaranteed to be sent, rather than omitted entirely. I remember having the opposite problem a while ago, where the defaults were being used for values which the user had cleared in the form. I don't remember whether that was CGI or StickyForms though, nor how or whether I managed to fix it.

I'll have to do some reading and experimentation.

@remorse
Copy link
Author

remorse commented Mar 28, 2012

According to the spec (which I quoted in issue 1), undef means that the variable was not passed at all; if it is empty, CGI will return an empty string... I don't know if that helps or not...

@pmh1wheel
Copy link
Owner

Sorry, I was talking about the browser, not CGI.pm. If the user clears a
field on a form, will the browser always send an empty parameter?

@remorse
Copy link
Author

remorse commented Apr 12, 2012

So far, in my current testing, yes, but I haven't been exhaustive about this yet...

@pmh1wheel
Copy link
Owner

Sorry if I appear to be ignoring this. My time is being sucked away by other things at the moment, but I haven't forgotten about it

@remorse
Copy link
Author

remorse commented Apr 17, 2012

No worries -- I know exactly how that goes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants