# Capture data on whether user has agreed to terms of service

**URL:** <https://community.auth0.com/t/capture-data-on-whether-user-has-agreed-to-terms-of-service/130458>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [March 25, 2024, 9:47pm UTC](https://community.auth0.com/t/capture-data-on-whether-user-has-agreed-to-terms-of-service/130458 "2024-03-25T21:47:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![charvi.virani](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/charvi.virani/32/49062_2.png) [@charvi.virani](https://community.auth0.com/u/charvi.virani)\
**Post date:** [March 25, 2024, 9:47pm UTC](https://community.auth0.com/t/capture-data-on-whether-user-has-agreed-to-terms-of-service/130458/1 "2024-03-25T21:47:02Z")

</div>

Hi,

I have a custom login form. I’m having users open the ToS in a new modal, with the checkbox at the bottom of the modal. I need to capture whether user has agreed to ToS (that is, selected the checkbox).

Before, I gated the Login button in the form itself, so it is disabled if user hasnt selected the ToS. But now, I need user to select ToS every year. Hence, my new approach is:

1. Add “Read our Terms of Service and User Agreement” link at the bottom of login box.
2. When user clicks on Terms of Service link, open a Modal with ToS and a checkbox “Agree to ToS”.
3. Capture whether user has agreed to the ToS or not (checkbox.checked).
4. In Post-Login actions, check whether user has agreed to ToS or not.  
4.A. If user has accepted ToS, set the “tos\_accepted” date in user\_metadata.  
4.B. If not, check if user has accepted before in the past year. If yes, allow user to login. If not, throw an api.deny error that user needs to accept ToS again. (There’s also a bit that checks if this is user’s first login and if they have accepted ToS, but that’s irrelevant for this discussion).

I’m looking for a way to capture data from custom login form and send it to Post Login Actions.

I tried Lock but it was very confusing to me. Especially since I would need ToS to be accepted annually instead of just at sign up. It doesnt fit my needs.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [March 29, 2024, 5:56pm UTC](https://community.auth0.com/t/capture-data-on-whether-user-has-agreed-to-terms-of-service/130458/5 "2024-03-29T17:56:01Z")

</div>

Hi @charvi.virani

Welcome back to the Auth0 Community!

Thank you for posting your question. Currently, the flow can, with some flows, be achieved with progressive profiling. You would need to conditionally redirect users with Post Login Action after logging in to your page with the TOS they would accept. However, we currently have a new feature you may be interested in in a private beta. Forms for Actions would make it possible to achieve the described flow in an almost plug-and-play fashion. You can read more about it here → [Forms for Actions](https://auth0.com/docs/customize/forms)

And more about progressive profiling here → [Understand How Progressive Profiling Works](https://auth0.com/docs/manage-users/user-accounts/user-profiles/progressive-profiling)

I hope this will help you.

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 12, 2024, 5:56pm UTC](https://community.auth0.com/t/capture-data-on-whether-user-has-agreed-to-terms-of-service/130458/6 "2024-04-12T17:56:45Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
