Question on Views and Only Emailing Entry Just Submitted by User

By: Taylor Finn | Asked: 01/26/2024
ForumsCategory: How-toQuestion on Views and Only Emailing Entry Just Submitted by User
Taylor Finn asked 8 months ago
Hello! I have a calculator form that is complete. At the bottom of the form, there is a contact information area and a submit button. What I want to happen is for that user's entry to populate the view I created and then send off their way. And I only want their entry to ever show up for them, even if they go and press that link a day later. The issue is this: Without any filter on for the entries... it will send a download link and that link will contain the views for all entries that have been made. So the download link itself will get longer and longer as users submit entries. And it is also a live link... so if I manually go in and delete all entries and then go back and check that link that was emailed... it will now have no content available. I tried limiting the "Limit" feature under Advanced Settings in Views and that doesn't work. I'm guessing it's some kind of filter in filter entries. But can somebody provide an example of a filter that would accomplish what I'm after? How do i resolve this?

Thank you!
1 Answers
Victor Font answered 8 months ago
Limiting entries to one in a view requires a filter. Normally, you would filter on the user's WordPress user id. To do that, they need to be registered in your system and logged in when they complete the calculator. Without a unique ID you can use to identify the user and related entry, there's isn't any way to accomplish what you want. Are your users logged in? Do they have WordPress user ids? If not, you have to decide how to uniquely identify your users from the information you capture in the contact information. Then you'll have to figure out how to verify the user is the correct one before you display the view.
Taylor Finn replied 8 months ago

This is going to be a calculator on a website. So folks will not be logged in. They will just be entering a few inputs and then entering contact name and email at bottom. Do you have any other thoughts on accomplishing this given the context?

Rob LeVineRob LeVine replied 8 months ago

One way I can see doing it is to have the entry key (or id) be part of the URL you send each user, e.g., mydomain.com/mypage?entry_key=23mdy and then use [get param="entry_key"] as your filter in the view. That way you guarantee each user will only see his/her own entry.

Taylor Finn replied 8 months ago

Rob, This seems promising. Can you walk me through a bit more how I would go about having the entry key (or ID) be a part of the URL you send each user?

I know how I could add that filter into the view in "filter entries" inside of the Views panel.

And I currently have the following shortcode for the email being sent out under Actions & Notifications:
[frm-pdf view=16768 public=1]

Thank you

Rob LeVineRob LeVine replied 8 months ago

Since you're using frm-pdf to generate the link why not use this? https://formidableforms.com/knowledgebase/pdfs/#kb-display-listing-view-in-custom-pdf

That way each link is only going to open the specific entry.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right