Closed (duplicate)
Project:
Webform
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2008 at 15:26 UTC
Updated:
3 May 2008 at 04:35 UTC
Hi,
%get[key] doesn't work for hidden fields but works for textfields.
thanks,
introfini
Comments
Comment #1
introfini commentedbetter yet, it just works for %get[q], not for other variables in the $_GET array like in this example:
node/30110?nid=1000 -> %get[nid]
introfini
Comment #2
quicksketchDuplicate of http://drupal.org/node/223388
Comment #3
quicksketchComment #4
ellen.davis commentedI did some digging into the code, and have found a possible fix. In function _webform_render_hidden change '#value' to '#default_value'.
Comment #5
gemini commentedI assume this was an advice to edit the function in the module file. That didn't help.
I rendered my hidden filed arrays and pin pointed the actual variables that carry posted values. Then I went to my webform template file and before the drupal_render() function entered the following condition:
This worked for a regular text field, but didn't work for the hidden email field. The values are being entered into the array just fine. Actually for the email I have [value] set and the ['#default_value'] set (just in case) and after than didn't work out, I went after the :
which didn't deliver the desired result either. But as I said, it works with regular text fields.
If someone can help me out to get this temporary workaround for the hidden email field working, I would greatly appreciate it.