How can I retrieve data from the database based on user_id to track the website form submissions?

I am using Matomo (an open-source tool) to track users by ID and capture user events. So I want to track the form data with which users interact on the website, but I am getting the data about the form elements with which the user interacts not the actual data of the form. Like bellow :

  1. Form - Select Change - State Select [0]

  2. Form - Range Change - Range Input [0]

  3. Form - Checkbox Change - Skill Checkbox [0]

  4. Form - Checkbox Change - Skill Checkbox [0]

  5. Form - Submit - Tracking Form [0]

But I also needed the form data that the user had selected, so I altered the code which helped to send the event to the Matomo: “_paq.push();” function in which we send the form element or event info. I’m sending the actual form data to Matomo using the user_id instead of a category. However, I am now able to view the form data in the “log_action” table of the database, where it is saved in the “name” column.