Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
232 views

Plugin field-type not getting javascript variable?

Updating a plugin from Craft 2 to Craft 3, so this logic used to work. The plugin has a field-type which is a button. When clicked, the button does stuff depending upon another field. That handle(ID) ...
kr37's user avatar
  • 1,355
1 vote
1 answer
201 views

Garnish event when changing category group

When I am on the categories index (admin/categories), is there a Garnish event that fires when you select a different category group in the sidebar? I want to add some custom JS after the AJAX request ...
Trevor Davis's user avatar
2 votes
1 answer
351 views

Craft 3 js - extend the field layout designer field settings

I would like to have the ability to include a custom option in the field layout designer field settings. There is already a plugin for Craft 2 that uses this feature Relabel for Craft And I would ...
Robin Schambach's user avatar
1 vote
1 answer
506 views

Craft 3 - custom callback after Garnish onDragStop

I would like to trigger a custom javascript function after an element in a matrix block was moved in the matrix but I'm not sure how to attach the event without changing the MatrixInput.js. So far I'...
Robin Schambach's user avatar
2 votes
1 answer
177 views

How to access Craft.EditableTable instance in CraftCM

I am developing a custom plugin that has a variable setting that can take multiple options. I've decided to use forms.editableTable from Craft's _includes/forms. It does the job great, saving and ...
Rodrigo Passos's user avatar
3 votes
1 answer
322 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 ...
Brad's user avatar
  • 487
3 votes
2 answers
748 views

Access add and remove events with the Craft Element Selector?

Is there any way to access an event, and trigger some function, when an element is added / removed with the Craft Element Selector logic available in Garnish? I am working on a custom field type and ...
Sam Hibberd's user avatar
4 votes
3 answers
2k views

JS templating in Craft CP

I'm writing a plugin where I need to render some semi-complex HTML clientside at runtime (all inside the CP). Does Garnish (or any other library/framework/JS-thingamabob shipped with Craft) offer any ...
Mats Mikkel Rummelhoff's user avatar
3 votes
2 answers
200 views

Is there an accessible callback when Craft.EntryTypeSwitcher is run?

When a user switches Entry Types in the control panel, Craft.EntryTypeSwitcher is trigged which in turn triggers onTypeChange. Is there callback that a plugin can access to run some additional ...
Peter Tell's user avatar
  • 1,838
4 votes
1 answer
542 views

Can Garnish be extended to allow plugins to use custom keyboard shortcuts?

For example, when editing an entry cmd + s saves the entry. Is there an easy way to extend Garnish to allow for my plugin to listen for custom keyboard shortcuts?
Jason McCallister's user avatar