Questions tagged [elementaction]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
76 views

How to make custom element types restorable?

In Craft CMS 3, custom element types support soft-deletion out of the box. But once soft-deleted, there is now way to restore elements that are now listed in the Trashed status, the only available ...
user avatar
  • 1,130
1 vote
1 answer
54 views

Hide/show element actions dependent on tab

I have a custom element index with an element action to 'Approve' elements. The element index has 'Live' and 'Staged' sources. Where/how do I set it to only show this action on the 'staged' source OR ...
user avatar
  • 2,462
1 vote
1 answer
56 views

Adding an additional Download PDF to orders

Is there a hook or something I can use to add an additional Download PDF option to the Edit Order screen? It looks like a dropdown, but I can't find any docs on how to add to it.
user avatar
2 votes
1 answer
3k views

How to call Controller in Module?

I'm very new to craft and I'm having trouble finding an answer to my question (I've scoured the questions on here - but the only answers appear to be for plugins). Basically, I want to submit a form ...
user avatar
  • 21
0 votes
1 answer
159 views

How should I fix an odd action URL? [closed]

I have a controller which is eventually going to be set up for POSTs and GETs, but the weird thing is I can only access it through localhost/index.php?p=actions/twoFA/get where twoFA is my plugin ...
user avatar
  • 1
1 vote
0 answers
44 views

Redirect from element action

I'm trying to process multiple elements in a custom element action, and then redirect the CP user to a url. How would I do that?
user avatar
  • 2,957
1 vote
1 answer
574 views

Plugin's action URL not working and showing 404 error

I created a plugin to schedule some custom email notifications. The action URL is working perfectly on localhost but isn't working on stagings server. Is it related to any server stuff.
user avatar
5 votes
1 answer
577 views

Get the type of action and the elements(s) that an action is being performed on when listening to elements.onPerformAction?

I have a plugin that needs to do something when an entry is deleted. I've recently discovered that the entries.deleteEntry event is not fired when deleting bulk entries (the list view with checkboxes) ...
user avatar
  • 373
3 votes
1 answer
314 views

Listen for checkbox check event for assets table and modify action trigger menu item

I am able to listen to an event when the user checks the checkbox in the assets table. This is within my js file init file that extends garnish: Garnish.Base.extend When the checkbox is selected, I ...
user avatar
  • 487
0 votes
2 answers
506 views

Trouble loading custom element action (menu option)

How do you load a custom element action using getAvailableActions inside my Element Type class? public function getAvailableActions($source = null) { $customAction = craft()->elements->...
user avatar
  • 1,685
3 votes
1 answer
305 views

Relating entries to assets within an ElementAction

I'm following the Element Actions example from the official Craft docs. I've defined an Artist entry type, and have defined an entries field on my Assets to relate an Artist to each Asset. To avoid ...
user avatar
1 vote
1 answer
346 views

How to set error message in element action?

I call a service function inside the performAction method of custom element-action and I'd like to show an error message to user if the service function returned false. I was able to set success ...
user avatar