- Issue created by @kevinquillen
- π§π·Brazil renatog Campinas
Thanks for your feedback @kevinquillen
No cookies are ever written when a user clicks "OK" or in this case re-labelled to "I Accept"
The project wasn't designed to create cookies on "OK" button, so isn't a "bug", but I definitely is a great suggestion so I'm converting to Feature Request
Workaround
For now as a temporary you can use
HOOK_modal_ID_alter()
and when the user clicks on "I accept" we can store the cookie programmaticallyExample:
/** * Implements hook_modal_ID_alter(). */ function HOOK_modal_ID_alter(&$modal, $modal_id) { // Set cookie to don't show again $cookieName = 'please_do_not_show_again_modal_id_' + $modal_id'; // TODO: logic to insert the cookie. }
Other possibility:
- Edit this Modal(s)
- Put a class on "OK button" E.g.
i-accept-modal
- Hide the checkbox
please don't show again
for the end-users withdisplay:none
- Create a custom JS to mark this checkbox when the user clicks on "I Accept" class
I also see no way to control the cookie name for each modal
We also don't have this option, I created a ticket to implement that β¨ Create a way to customize the cookie name for "don't show Modal" Active
Question: If we have one config inside "Global Settings" to customize the cookie is enough, or do you think is necessary to customize cookie name from Modal to Modal?