Skip to main content

Questions tagged [modal]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
296 views

Bootstrap 4 Modal show same image, regardless of thumbnail selected

I have the following code that's mostly working: {# # Decades category template # ------------------- #} {% extends "_layout" %} {% set title = "Decades" %} {% block content %} &...
Shad's user avatar
  • 451
1 vote
0 answers
385 views

Creating a modal popup using CraftCMS and Twig

I've been looking everywhere, I'm trying to create a modal using a global but I can't seem to figure out where to start. JavaScript: $popUp = new Garnish.Modal($('#popUpModal('), $popUp.show(), $popUp....
Jayme Sinn's user avatar
2 votes
3 answers
1k views

Login Modal - How to handle incorrect password / credentials?

I'm developing a site in Craft 2, using a modal to display the login form. The modal can be seen by clicking the Login button at top right. I'm essentially using the form as outlined in the Craft 2 ...
Ed Hebert's user avatar
  • 145
1 vote
1 answer
900 views

How to create a Modal with a scrollbar

I'm trying to create a Modal and have a question: my code is: <div id="my-modal" class="modal" > <div id="modal" class="body"> <header class="header"> <h2&...
Robin Schambach's user avatar
1 vote
1 answer
102 views

Limitation of adding a Category from the CP field modal within an entry

Is there a way to either add a parent selector to the category field modal, or remove/hide the "+ New Category" button when editing an entry? We are using a category group to contain Locations, which ...
Mike Pringle's user avatar
6 votes
2 answers
9k views

Javascript events when modal window is opened or closed

How can I detect when a modal window has been opened or closed? I am writing a plugin which wants to detect when a garnish elementeditor modal window has been opened or closed.
Marion Newlevant's user avatar
3 votes
0 answers
140 views

How can my plugin use Craft's native dragdrop support

I am using a generic Garnish modal from Craft like so: $container = $('.upload-modal'); $modal = new Garnish.Modal($container, { autoShow: false }); I would like to have craft's native drag&...
Jacob's user avatar
  • 282
2 votes
1 answer
2k views

How to create modals

I just want to create a modal and play with it, but can't find a way to do so. I already checked other questions on the subject, but I still can't figure why my modal isn't showing correctly. Here is ...
ovesco's user avatar
  • 271
1 vote
1 answer
253 views

When using "createElementSelectorModal()" how do you respect selected locale?

When using createElementSelectorModal() in a plugin, how do you make your source list show items from the current locale selected in the CP? It only seems to show the items from default locale no ...
a-am's user avatar
  • 2,857
1 vote
0 answers
73 views

Entries fieldtype

Is there scope for updating the Entries fieldtype so that only sections editable by the user are shown in the pop-up modal? Obviously don't want to go changing the core files, but some digging ...
Cole Henley's user avatar
  • 1,741
1 vote
0 answers
66 views

User Group specific asset paths

I've been doing some quite involved work on a site where we want to restrict user access to certain asset paths. Following the post at Assets Folder: Images don't show up I was directed to the ...
Cole Henley's user avatar
  • 1,741
5 votes
1 answer
235 views

Are there callbacks for elementSelect macro?

I am writing a custom field type that makes use of Craft's asset selector, and saw that there is an elementSelector macro (in includes/_forms). I want to be able to do some things onSelect, but I ...
kcolls's user avatar
  • 608
0 votes
1 answer
179 views

How to set selected elements when creating modal with "createElementSelectorModal()"?

I'm showing a modal using "createElementSelectorModal()" In some cases I need to pass ids of elements which should be selected right after the modal is created. Is it possible?
Stalinko's user avatar
  • 113
0 votes
1 answer
245 views

Assets Content/Fields not available until entry is saved?

I've got Asset location setup with a Photo Caption field. And a Photo Gallery field which references said Asset. When creating a new entry, I'm uploading images to the Photo Gallery field. When the ...
secondbridge's user avatar
2 votes
1 answer
554 views

How can I use the password confirmation modal on other forms?

While logged into the Control Panel, you can edit your account information. When you try to change your email address or password, Craft asks you to enter your current password (for security reasons). ...
Lindsey D's user avatar
  • 24k
3 votes
1 answer
119 views

Recommended way to provide user feedback in the control panel?

Is there a recommended way to provide user feedback in the control panel — something like a modal window with a simple 'ok' button to dismiss? I am writing a plugin that syncs data between users, ...
Douglas McDonald's user avatar
2 votes
1 answer
571 views

Possible to override Garnish.Modal? [Plugin]

Is there a way to override Garnish.Modal? For example, I have a custom modal which uses a custom form but I want to be able to use the built in forms.elementSelect to select from a user list. When I ...
Adam McCombs's user avatar
  • 1,695
2 votes
1 answer
326 views

Image transforms and modal gallery

I'm using a gallery where when an image is clicked it opens a larger version in a modal. <li><a href="{{ varGalleryImages.getUrl('galleryLarge') }}"><img src="{{ varGalleryImages....
Martin's user avatar
  • 1,203
23 votes
1 answer
2k views

How can my plugin generate a generic modal window in the Control Panel?

I'm working on a plugin, and it requires a modal to be displayed when the user interacts with a field of my Field Type. When the user finishes interacting with the modal, they would click "Done". ...
Lindsey D's user avatar
  • 24k