Capture IP Address on Form Submission, store in Reports Dashboard.
Permalink
Hi, how can we make contact forms and other access logs save the IP address in the log and have it viewable from reports dashboard?
Similar trick to add CID to a form in this 5.6 howto
http://legacy-documentation.concrete5.org/tutorials/record-the-page...
http://legacy-documentation.concrete5.org/tutorials/record-the-page...
So by default, concrete never handles any kind of IP address data?
Nothing to do with your requirement, but IP is used for the blacklist
dashboard/system/permissions/blacklist
dashboard/system/permissions/blacklist
Create a text field in the form for the IP. Then add some css to hide the field and some javascript that fills in the IP field using a call to an IP service.
2. Higher security, still spoofable but takes a bit of expertise
Override the form block controller to note client IP addresses against form ID in a table created for that purpose when a form is submitted.
Override the dashboard page to show the IP.
3. Combination of the above. eg, do (1), but rather than using javascript, fill in the IP field as the form is received at the server. That could be achieved by overriding the form controller or using a c5 event handler to manipulate the post data before it is seen by the form controller.