Auto Action Code

8 years 5 months ago - 8 years 5 months ago #273749 by edmundcheong
Auto Action Code was created by edmundcheong
I am trying to get this to work: jsfiddle.net/ozkary/3zu008ch/light/

I have specifically put the HTML part into:

Method: HTML

check out the html.txt - security reasons the forum is not accepting the codes.

File Attachment:

File Name: html.txt
File Size:3 KB

Return: Print
+
Method: JS (Inline)
check out the css.txt - security reasons the forum is not accepting the codes.

File Attachment:

File Name: css.txt
File Size:1 KB

--
Trigger: After User Profile Edit Display
Conditions: cb_action Equal to Print


I have tried with various combinations (especially for the HTML Return type but yet I hit an error with output of the user profile.

Am i doing something wrong here.. can you show me the right way of putting these into the auto action? Has it got to do with sequence? Tried that as well but it didn't work.
Attachments:

Please Log in to join the conversation.

8 years 5 months ago #273753 by krileon
Replied by krileon on topic Auto Action Code
Your condition is always going to fail as it's not a valid substitution you need to change cb_action to [cb_action]. The return output for the HTML probably needs to be an echo; it varies depending on the trigger used. Start with something simple like outputting "Hello!" from an HTML method Code action.


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.

8 years 5 months ago #273756 by edmundcheong
Replied by edmundcheong on topic Auto Action Code

krileon wrote: Your condition is always going to fail as it's not a valid substitution you need to change cb_action to [cb_action]. The return output for the HTML probably needs to be an echo; it varies depending on the trigger used. Start with something simple like outputting "Hello!" from an HTML method Code action.


My substitution is correct is. I have the [] on.

Hello works but some how the html codes which I uploaded didn't work. It's working on the jsfiddle site..

Please Log in to join the conversation.

8 years 5 months ago #273763 by krileon
Replied by krileon on topic Auto Action Code
I can't help you with custom code. There's no guarantee it's going to work everywhere; jsfiddle is a strictly controlled environment. You'll need to inspect the page code to see if it's even outputting to the DOM as well as the browser developer console to see if the JS maybe erroring.


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.

8 years 5 months ago #273765 by edmundcheong
Replied by edmundcheong on topic Auto Action Code

krileon wrote: I can't help you with custom code. There's no guarantee it's going to work everywhere; jsfiddle is a strictly controlled environment. You'll need to inspect the page code to see if it's even outputting to the DOM as well as the browser developer console to see if the JS maybe erroring.


ok, understood. But is there a user manual or documentation somewhere I could read about utilizing the auto action code in detail?

Thanks in advance.

Please Log in to join the conversation.

8 years 5 months ago #273767 by krileon
Replied by krileon on topic Auto Action Code
CB Auto Actions is just a tool so there's nothing to document beyond usecases. Parameter usage is described in each input description. The below is some up to date CB Auto Action usecase videos.

www.youtube.com/playlist?list=PLp0puRITgC7McQcw0Sli1qfSUQGwmflzi

The Code action specifically for HTML method directly takes the HTML string you provide, passes it through substitutions, then outputs it based off the Return selected (probably need to use Echo). You'll need to inspect the page to see what's really going on with your code though.


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.534 seconds