Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
forms system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 May 2007 at 21:51 UTC
Updated:
12 Jun 2007 at 04:18 UTC
Jump to comment: Most recent file
Comments
Comment #1
Stefan Nagtegaal commentedIsn't it nicer todo:
instead of:
Just my $0,02..
Comment #2
Stefan Nagtegaal commentedSet better title
Comment #3
nedjoYes, we should make this change.
I agree that 'form-' is a better prefix.
Comment #4
Stefan Nagtegaal commentedUpdated code, that works!
Comment #5
dries commentedCommitted! Thanks.
Comment #6
eaton commentedFor the record, we do this because it allows us to identify, via the incoming $_POST data, what specific version of a form is coming in. Not just the form's identification (like, 'node-story-form') but the specific instance of that form, built on a particular page at a particular time for a particular user.
This is particularly useful when AJAX code is making client-side modifications to a form; it can relay information back to the server to keep the server side validation code in sync with the client side form, for that particular instance.
Comment #7
bjaspan commentedEaton,
No, you are outputting a hidden form field whose value is a randomly-generated hash for that purpose. Outputting an id field as well has no such benefit as id fields are not transmitted back to the server. It has very little cost and I suppose it can help with debugging, but it has no benefit in any other case I can think of.
Comment #8
eaton commentedThanks for the clarification, I misread your post. You are correct that the hidden field serves that purpose.
Comment #9
bjaspan commentedOkay. I'm glad to know I'm not crazy. :-)
Comment #10
(not verified) commented