Skip to Content Skip to Menu

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

[SOLVED] Auto Actions - after field value change - what's the trigger?

  • azjr
  • azjr
  • OFFLINE
  • Posts: 99
  • Thanks: 10
  • Karma: 2
8 years 5 months ago - 8 years 5 months ago #281440 by azjr
Hi Kyle - I want to generate auto action (send email) after user saves value in checkbox:
[cb_bonus_prog_01] Equal to 1 / YES

What trigger should I select?
BTW, is there list of all triggers with some basic explanation of what they do?
Thanks!
Last edit: 8 years 5 months ago by nant.

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

  • azjr
  • azjr
  • OFFLINE
  • Posts: 99
  • Thanks: 10
  • Karma: 2
8 years 5 months ago #281448 by azjr
OK - I dig that out: onAfterUserUpdate and onAfterUpdateUser - if I'm understanding it correctly those two triggers work when field is updated by user, the other when admin updates the user field. - tested and it worked.

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

  • azjr
  • azjr
  • OFFLINE
  • Posts: 99
  • Thanks: 10
  • Karma: 2
8 years 5 months ago #281449 by azjr
Allright - this was fairly easy. How about this one:
user checks the box (value =1) => AFTER UPDATE (=> after saving the changes) the field EITHER is hidden from view, replaced by another (information - such as, 'step 1 completed'), or becomes read-only - whichever is easier/faster/safer to setup.

I'm not thinking here of a conditional visibility on the field - this would instantly hide the field after user checks the box, which might be confusing and cause that user do not click the update.
Thanks!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
8 years 5 months ago #281464 by krileon

BTW, is there list of all triggers with some basic explanation of what they do?

No, not at this time. Each trigger trys to be self explanatory, but some of the legacy core triggers maybe a little vague. In your case you need the after user update and after update user triggers. We do have the below, but it's a little out of date.

www.joomlapolis.com/support/tutorials/120-api-usage/18358-using-cb-triggers

OK - I dig that out: onAfterUserUpdate and onAfterUpdateUser - if I'm understanding it correctly those two triggers work when field is updated by user, the other when admin updates the user field. - tested and it worked.

Yup, those are correct. On fires for backend and the other fires for frontend. Specifically as follows.

Backend: onAfterUpdateUser
Frontend: onAfterUserUpdate

user checks the box (value =1) => AFTER UPDATE (=> after saving the changes) the field EITHER is hidden from view, replaced by another (information - such as, 'step 1 completed'), or becomes read-only - whichever is easier/faster/safer to setup.

CB Conditional can do this.

I'm not thinking here of a conditional visibility on the field - this would instantly hide the field after user checks the box, which might be confusing and cause that user do not click the update.

You don't have to condition on profile edit. You can configure the condition to only apply to profile display.


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 or Create an account to join the conversation.

  • azjr
  • azjr
  • OFFLINE
  • Posts: 99
  • Thanks: 10
  • Karma: 2
8 years 5 months ago #281466 by azjr

CB Conditional can do this.

Yes, I played with that - as I have said - all looks good, however, from the UX perspective, if I hide the field before client has a chance to click the "update" it might be confusing and thus client might not click the "Update" - this is a speculation, but thought to address it and find a solution...

You don't have to condition on profile edit. You can configure the condition to only apply to profile display.

OK - perhaps you are answering it right here what I'm after above, but I'm not sure I quite understand...
Ideally I would like to see the field hidden when user RETURNS to the edit tab (after initially saving /updating the account) -and will notice a note instead of checkbox (or just no checkbox to simplify) - if I would to use CB Conditional I think you're talking about the "For... and then use Profile View" ... ?
From what you see in my explanation - is this more clear from initial description?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
8 years 5 months ago - 8 years 5 months ago #281472 by krileon
Ok, that's doable too. You're wanting a hard condition and not an ajax one. This is done as follows.

Condition
Display: Field conditional self
Field: Custom > Value
Value: [FIELD_NAME]
Translate Value: No
Operator: Equal To
Value: VALUE
Translate Value: No
Mode: Hide


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 5 months ago by krileon.
The following user(s) said Thank You: azjr

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

Moderators: beatnantkrileon
Powered by Kunena Forum