Another question. On our sites, we track the referral source of a visitor (natural search, PPC, affiliate link etc), and we'd normally store this data with the form submission. Is there a way to have hidden form fields that populate from coookies or sessions?
Or would I be looking at writing a custom field type to add this kind of functionality?
Not 100% sure if this answers your question, but here goes:
I always use Autoform/Doc2Form for building forms, and often use this trick for submitting hidden data.Create a regular text field you want to store your hidden data in, and then hide it via stylesheet. Use a bit of clientside javascript for entering your values into this field, and remember that this javascript can be generated by a server side XSLT macro.
Hidden Fields
Hi,
Another question. On our sites, we track the referral source of a visitor (natural search, PPC, affiliate link etc), and we'd normally store this data with the form submission. Is there a way to have hidden form fields that populate from coookies or sessions?
Or would I be looking at writing a custom field type to add this kind of functionality?
Not 100% sure if this answers your question, but here goes:
I always use Autoform/Doc2Form for building forms, and often use this trick for submitting hidden data.Create a regular text field you want to store your hidden data in, and then hide it via stylesheet. Use a bit of clientside javascript for entering your values into this field, and remember that this javascript can be generated by a server side XSLT macro.
Hope this helps you out.
Best regards,
Soeren Sprogoe
is working on a reply...