The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Updating a form changes User ID
I'd love to learn some best practice for associating UserIDs to a form if the form is going to be moderated.
I have a registration form which captures UserID. As an Admin I've created a view that allows me to view each submitted form and change a field to "Approved" which then triggers email confirmations etc and all works beautifully. However I have also found that the UserID field is overwritten with my admin one after the form edit (undesirable) and I've also had some situations where the "Register User" action kicks in, and updates my details with the the user has entered in the form. This is also undesirable. Is anyone using an 'approve' button in this fashion and if so, how have you managed this issue? Love to hear 🙂
Thanks, Grant.
March 21, 2019 at 3:27 pm
Hey Grant,
By default, the UserID field uses the currently logged in user's ID, which is why you're experiencing that kind of behavior. The form is picking up your user ID, so it thinks that you're updating your own profile instead of re-submitting the form on another user's behalf.
Your best bet might be to use the filter to show the User ID as a dropdown on the front end. Make sure to change the User ID to the correct user when you're approving and resubmitting the form (you could even take it a step further and have the UserID dropdown filter based on a URL parameter...)
https://formidableforms.com/knowledgebase/frm_setup_new_fields_vars/#kb-display-userid-dropdown-on-front-end-for-admin
March 23, 2019 at 2:16 pm
Thanks Maryann, Great. I've now got the UserID showing up, including passing it from my approval list view as a GET parameter. It passed a quick test so hopefully will all be good, and also updated my RegisterUser action not to trigger if the admin is userID is supplied. In retrospect, this seems like a very prudent step!
Thanks for your help.
Discussion closed.