Reset Field group field to 0 at expiry of plan

4 years 5 months ago #314820 by matt@harrington.co.nz
Reset Field group field to 0 at expiry of plan was created by matt@harrington.co.nz
Hi all,

I have a field group which is working great and am assigning a "tag" in the field group in a cbsubs plan.

At expiry of the plan I want this field set to 0 with the remainder of the field group fields remaining (name and date of birth).

Is there a straightforward method of doing this? The field reset method doesn't work on a field group.

Many thanks, Matt.

Please Log in to join the conversation.

4 years 5 months ago #314843 by krileon
You won't be able to set the value of an individual field in a fieldgroup from CBSubs. It's a lot more complicated to change the values of field group fields as the value of such a field is actually just a JSON string. You'd need some like a Code action in CB Auto Actions to convert the JSON to a PHP array, parse through the rows of the array, find the row you want to change, and then change the field value in that row. I don't recommend using a field group field if you need to do value switching like that.


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.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.183 seconds

Facebook Twitter LinkedIn