How do I combine Auto Action and Code/HTML Field to do this?

8 years 1 month ago - 8 years 1 month ago #280236 by edmundcheong
Just to check, how do i create an auto action to the following image (circled in red).. meaning to click on a link/button to execute a table/record update query..


I would like to have a similar button/link which updates a html field on profile edit..

I believe I have to use the Auto Action and Code/HTML Field..
Attachments:

Please Log in to join the conversation.

8 years 1 month ago #280250 by krileon
To add a button to field management you need to modify the below XML file.

administrator/components/com_comprofiler/xmlcb/views/view.com_comprofiler.showfields.xml

We do not support core edits so I can not advise you on how to do this, but that is where it'd be done.

To execute a auto action via URL you need to set the Triggers to None then you can use the URL found on the Global tab of your action.

What exactly are you trying to do and why does it require manually updating a Custom HTML field?


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 1 month ago #280253 by edmundcheong

krileon wrote: To add a button to field management you need to modify the below XML file.

administrator/components/com_comprofiler/xmlcb/views/view.com_comprofiler.showfields.xml

We do not support core edits so I can not advise you on how to do this, but that is where it'd be done.

To execute a auto action via URL you need to set the Triggers to None then you can use the URL found on the Global tab of your action.

What exactly are you trying to do and why does it require manually updating a Custom HTML field?


Hey kyle, thanks for the reply.. i apologise for a general question.. need to be more specific..

The image above is an example..

What iam trying to do was to display a table using the query fieldtype by displaying records from a mysql table and on the last column, i would like to generate the "x" icon and onclicking the "x" i would like update a column in the record.. similar to what the field management is able to do..

So i am trying to mix and match both fieldtypes and auto action for this purpose.. thought about url autoaction but i cant seem to target the particular column and record in the mysql table..

I am not interested in editing the core..

Hope it is understandable this time.. :lol:

Please Log in to join the conversation.

8 years 1 month ago #280262 by krileon
You'd use a Query action with Triggers set to None then you'd add the row id to the URL, which you can then use in your query. You'd want to sanitize the substitution as follows.

[cb:parse function="clean" method="int"][get_row][/cb:parse]

The URL to your action for example would be as follows.

index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=ACTION_ID&row=ROW_ID_HERE

In your Custom HTML field or wherever you need it you'd supply a link to the above URL usage to directly execute your action.

To redirect back to profile you could create Redirect action that acts on autoactions_onAction where you'd then condition against [var2_id] to ensure it's your query action.

In short it is possible for CB Auto Actions to provide standard component endpoints. So in short you could theoretically make an entire component just chaining actions, but that's a pretty advanced usage.


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

Facebook Twitter LinkedIn