The webform I am working on contains a couple of nested fieldsets and I noticed that when I view a submission it displays the raw encrypted data. Looking into the code I can see that there is no checking done to see if the item is inside a fieldset. Also if a hidden field happens to be encrypted (say you are adding data to this field using a hook) then it is not automatically decrypted. This is due to it using #markup as the array key, not #value.
I have attached a patch to this issue which handles the nested fieldsets and the hidden field. The code checks to see if there are parents on the encrypted component and then provides a reference to that component within the fieldset.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | webform_encrypt-fieldset-problem-1503786.patch | 1.64 KB | yan |
| #1 | submission_render.patch | 1.7 KB | akoepke |
| submission_render.patch | 1.67 KB | akoepke |
Comments
Comment #1
akoepke commentedJust noticed that my change to allow #markup and #value had the unwanted side-effect of including the data in the site owner email, even if you deselected it.
I have now put a check in there which only uses the #markup if it is set and it is not an email.
Comment #2
cviccaro commentedKudos for your patch.. it works well. Thanks.
Comment #3
pebosi commentedWorks for me, too.
Comment #4
theunraveler commentedThis should be fixed in 7.x-1.x. Needs to be backported to 6.x-1.x, which I will do this weekend. Thanks for the reports.
Comment #5
yan commentedPatch from #1 seems to solve the problem for me using 6.x-1.x-dev. I attach a patch for the latest D6 dev version of the module.