Skip to main content

Questions tagged [elementaction]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer

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 ...
nstCactus's user avatar
  • 1,149
1 vote
1 answer

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 ...
dmatthams's user avatar
  • 2,492
1 vote
1 answer

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.
Emily Fitton's user avatar
2 votes
1 answer

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 ...
matt's user avatar
  • 21
0 votes
1 answer

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's user avatar
  • 1
1 vote
0 answers

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?
Fred Carlsen's user avatar
  • 2,997
1 vote
1 answer

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.
Bhashkar Yadav's user avatar
5 votes
1 answer

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) ...
jthomas's user avatar
  • 373
3 votes
1 answer

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 ...
Brad's user avatar
  • 487
0 votes
2 answers

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->...
Adam McCombs's user avatar
  • 1,695
3 votes
1 answer

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 ...
Emyr Thomas's user avatar
1 vote
1 answer

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 ...
mohd4482's user avatar
  • 612