0

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
  • "Write some code" is technically an answer to this question. What research have you done?
    – cilefen
    Oct 19 at 20:59

1 Answer 1

1

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.

3
  • 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.
    – Dee
    Oct 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
  • 1
    The 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.
    – Dee
    Oct 22 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.