Hidden feature: get access to the submitted form data
You can set up some action which will be triggered after a form is submitted:
![](https://storage.crisp.chat/users/helpdesk/website/7e782a40c0560c00/image_1labrr8.png)
One of such actions is running a custom JS code:
![](https://storage.crisp.chat/users/helpdesk/website/7e782a40c0560c00/image_ddxhkr.png)
What if you need to access the submitted form data in this custom JS code? There is a solution!
Use the formDataKeyValue variable to access the form data.
![](https://storage.crisp.chat/users/helpdesk/website/7e782a40c0560c00/image_1ozhpg.png)
Alternatively, you can access formDataSerialize or formDataSerializeArray if you prefer another data schemes.
Is it safe?
Answer:
This feature does not disclose your visitors' data. It simply give a simple on-page only access to it.
The user data still is not stored on our servers and therefore can not be leaked.
How can I benefit from this feature?
Answer:
You can pass custom events based on the inputed data to your analytics tool to segment your audience.
![](https://storage.crisp.chat/users/helpdesk/website/7e782a40c0560c00/image_1labrr8.png)
One of such actions is running a custom JS code:
![](https://storage.crisp.chat/users/helpdesk/website/7e782a40c0560c00/image_ddxhkr.png)
What if you need to access the submitted form data in this custom JS code? There is a solution!
Use the formDataKeyValue variable to access the form data.
![](https://storage.crisp.chat/users/helpdesk/website/7e782a40c0560c00/image_1ozhpg.png)
Alternatively, you can access formDataSerialize or formDataSerializeArray if you prefer another data schemes.
Question:
Is it safe?
Answer:
This feature does not disclose your visitors' data. It simply give a simple on-page only access to it.
The user data still is not stored on our servers and therefore can not be leaked.
Question:
How can I benefit from this feature?
Answer:
You can pass custom events based on the inputed data to your analytics tool to segment your audience.
Updated on: 20/07/2022
Thank you!