# Form Validation Error Tracking

**URL:** <https://community.dynatrace.com/t/form-validation-error-tracking/20965>\
**Category:** Open Q&A\
**Tags:** real-user-monitoring-classic, problems-classic\
**Created:** [December 3, 2020, 2:55pm UTC](https://community.dynatrace.com/t/form-validation-error-tracking/20965 "2020-12-03T14:55:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JGannon](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@JGannon](https://community.dynatrace.com/u/JGannon)\
**Post date:** [December 3, 2020, 2:55pm UTC](https://community.dynatrace.com/t/form-validation-error-tracking/20965/1 "2020-12-03T14:55:30Z")

</div>

We have a form that validates the form fields before submission. If there is an error, a window is displayed to alert the user there are errors. We also display the form field error in an error state. I am wondering if it is possible to know the following: “Number of times the button was clicked, and the number of times the error notification is displayed. Taking it a step further, which fields in the form had the most errors.”

This would allow us to know if there are any issues with form fields. If a certain field is always left blank or has invalid input it would be good to know.

It sounds like this would require a complex query but I don’t know where to start. Any info or examples would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [December 31, 2020, 8:36pm UTC](https://community.dynatrace.com/t/form-validation-error-tracking/20965/2 "2020-12-31T20:36:31Z")

</div>

So I would recommend a conversion goal. Lets say with Easy Travel, you want to know how many people actually click “Book Now” You can set that XHR action as a conversion goal. Keep in mind this is forward facing, so once its set up, you can see how many people clicked that button out of all the users on that page. Conversion goal will give you stats on the amount of actions “Clicks” and the number of users that made the click as well.

Conversion Goals: [Define conversion goals in RUM Classic — Dynatrace Docs](https://www.dynatrace.com/support/help/how-to-use-dynatrace/real-user-monitoring/how-to-use-real-user-monitoring/web-applications/define-conversion-goals/)

You can also set custom error/string detection. Take a look at this screen capture where we have defined out some unique errors that we are tracking, we can also see how this compares over a previous time frame.

We can see how many times users did not supply matching email addresses, forgot to put an email in, forgot to put a card expiration date in or an invalid card number and so on. These are all captured from the users session via a string detection.

 ![27782-img-8933.jpeg](https://global.discourse-cdn.com/dynatrace/original/3X/0/4/04ce3dca89d04ab5f83b3a79624746b399ca2b08.jpeg)

---

<div class="post-metadata">

**Author:** ![balaganapathi\_1](https://avatars.discourse-cdn.com/v4/letter/b/9e8a1a/32.png) [@balaganapathi\_1](https://community.dynatrace.com/u/balaganapathi_1)\
**Post date:** [August 18, 2021, 9:09am UTC](https://community.dynatrace.com/t/form-validation-error-tracking/20965/3 "2021-08-18T09:09:21Z")

</div>

Hi,

Could you please help me to configure those field validation errors in Dynatrace?

Thanks

Bala

---

<div class="post-metadata">

**Author:** ![fstekelenburg](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fstekelenburg/32/22029_2.png) [@fstekelenburg](https://community.dynatrace.com/u/fstekelenburg)\
**Post date:** [September 29, 2022, 10:44am UTC](https://community.dynatrace.com/t/form-validation-error-tracking/20965/4 "2022-09-29T10:44:11Z")

</div>

Hi Chad, running into a similar case, could you give an example of how you exactly did&nbsp;set custom error/string detection?

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [September 29, 2022, 6:11pm UTC](https://community.dynatrace.com/t/form-validation-error-tracking/20965/5 "2022-09-29T18:11:25Z")

</div>

Not sure what was Chad’s approach, we are doing it by capturing user action property by capturing the content using a CSS selector. Not an ideal situation though, but it works. The best approach is to send errors from your application directly using the [dtrum.reportCustomError](https://www.dynatrace.com/support/doc/javascriptapi/interfaces/dtrum_types.DtrumApi.html#reportCustomError)&nbsp;but this needs to be integrated into your web application code.

---

<div class="post-metadata">

**Author:** ![fstekelenburg](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fstekelenburg/32/22029_2.png) [@fstekelenburg](https://community.dynatrace.com/u/fstekelenburg)\
**Post date:** [September 30, 2022, 9:02am UTC](https://community.dynatrace.com/t/form-validation-error-tracking/20965/6 "2022-09-30T09:02:00Z")

</div>

can you share an example of how you set it up?

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [September 30, 2022, 2:36pm UTC](https://community.dynatrace.com/t/form-validation-error-tracking/20965/7 "2022-09-30T14:36:18Z")

</div>

This is an example of capturing it using user action property and CSS selector. DT will capture the values if the selector is found. It’s just a user action property. It won’t be shown in the error list in the Web Application itself.

 ![Julius_Loman_0-1664548475979.png](https://global.discourse-cdn.com/dynatrace/original/2X/4/4f4546c070e999c6f3fbb553bc2ddb98b9021493.png)

---

<div class="post-metadata">

**Author:** ![gilgi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gilgi/32/11747_2.png) [@gilgi](https://community.dynatrace.com/u/gilgi)\
**Post date:** [October 1, 2022, 5:42am UTC](https://community.dynatrace.com/t/form-validation-error-tracking/20965/8 "2022-10-01T05:42:54Z")

</div>

Just in case the validations are not done on the client side, you could also get the user action property from a server side request attribute.
