I created a view that current user can use to search/view user profiles. The view lists user profiles and shows one at a time. A profile page can be either flagged “Like” or “Pass” (dating website style). I want the next profile to load after the current user flags the profile they are viewing.
1 Answer
You can add a is/is not flagged filter to the view. If you don't see this option, you need to add your flag as a relationship to the view to get the filter to appear.
So, if you have configured the view to only show unflagged users, then if you're using the AJAX flag widget, I'm pretty sure it will automatically refresh the view and jump to the next person.
If not, you will have to write code to get it to refresh after each flag action.
-
Thank you, I did exactly this yesterday and it worked for my flag “Like”. However, I have three flags on the profile “Like”, “Pass”, or “Abuse” and I want the same thing to happen when the profile is flagged “Pass” or “Abuse”. I added two additional flag relationships to the view since you can only select one flag in a relationship, but it didn’t work for ”Pass” and “Abuse”. The profile does not get removed from the list when “Pass” or “abuse” flag is used. Been researching and I haven’t found a solution so far.– DeeOct 20 at 17:29
-
@Dee The fact that there are multiple flags needs to be in the question :). You can probably handle that by adding an OR condition group and adding all three flag filters to that condition group. Oct 21 at 0:49
-
1The method actually works. I just didn't do it properly. I needed to add three flag relationships to select each flag, then add three filters and select each of the flag relationship I added. Thanks again for the help.– DeeOct 22 at 21:06