Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

How to remove a user inputted value when unsubscribing a plan?

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
8 years 8 months ago - 8 years 8 months ago #277390 by timstohr
Hi how do I get CB subs to get rid of a value in a CB field that was inputted by the user?

Or can I disable a user if he has ever subscribed to the business account but does not want to pay anymore?

I basically have a pool of normal users. When they upgrade to professional account, they loose all the rights of normal users but gain a different set of rights. The thing is that I need to delete a whole host of stuff on the db to return them to normal users and it would be a pain to do due to different conditional triggers on third party components (for that I need the first question). It may be easier to jsut disable them until they pay again.

Option 2 may be the simplest...

EDIT: Just had another idea which may be the best yet: is it possible to have two conditions, ie that the user has to be part of the usergroup "XXXX" AND have "type of business" NOT EMPTY? Usergroup XXXX would be disabled at the registration so that this condition only applies to logged in users...
Last edit: 8 years 8 months ago by timstohr.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
8 years 8 months ago - 8 years 8 months ago #277398 by krileon
Shouldn't need to delete anything. It's pretty bad practice actually. You're better off restricting content with usergroup/view access level or using CBSubs Fields Tabs Protection for example to hide tabs/fields that are no longer relevant. If they decide to re-subscribe they'd have all the info they've already entered still there.

CBSubs can automatically handle usergroup assignment and removal from the Workflows tab of your plans. You can extend this even further with more robust usergroup management by using a Usergroup action in CB Auto Actions and with the below usage.

Plan Active
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditional 1: [var3] Equal To PLAN_ID_HERE
Conditional 2: [var2] Equal To A

Plan Expired
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditional 1: [var3] Equal To PLAN_ID_HERE
Conditional 2: [var2] Equal To X

You can use whatever action you want with the above. So if you still want to remove field values you can use a Field action for example.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 8 years 8 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
8 years 8 months ago #277815 by timstohr
Hmm it does not seem to work. I think it has to do with that I cannot remove the value using CB auto actions.

There is no option to remove value (or does it work when I have "Set field value = [Here I leave the field empty because i want it to delete the content]")

The thing is that I have conditionals that are set to "Not empty" and I need the field to reach the "Empty" state again.

Bye

Tim

Please Log in or Create an account to join the conversation.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
8 years 8 months ago #277816 by fribse2011
You can set an empty field by not putting anything in Set Field action.
I've done so here with auto actions.

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.
The following user(s) said Thank You: timstohr

Please Log in or Create an account to join the conversation.

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
8 years 8 months ago #277818 by timstohr
Thanks Fribse. It does actually work, CB subs drops the people down to Registered which is NOT what I want. I will find a solution to that though...

Please Log in or Create an account to join the conversation.

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
8 years 8 months ago #277819 by timstohr
Works perfectly now. CB Subs still drops to Registered but I have found a nice workaround. Thanks

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum