Dismissible alerts

Bootstrap allows to make a dismissible alerts. Blocs can’t. Is there any chance to add this function? A proper checkbox in this window would solve this:

Is there any other reason why the alerts cannot be dismissible in Blocs? Alerts in forms created with Blocs are dismissible … Maybe you know the way to make that kind of alerts with Blocs…? I tried to add “alert-dismissible” class but it not changed anything… (?)

@norm, you are best informed person here. :wink: Can you tell us more about this?

Blocs just generates the UI at the moment. You would need to write your own logic to handle removing the alert.

So … I found temporary solution:

  1. Create an alert,
  2. Drag into alert a HTML Widget, right above the “Yo! This is an alert”,
  3. In HTML widget paste this code:

<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>

From now alert becomes dismissible. BUT be careful! If you dismiss this alert in preview mode, it stays invisible in your project until you reopen it. (!)

As we can see, it’s quite simple. @norm, why not to add the checkbox to make the alert dismissible BUT after exporting the project…? Button would be inactive even in preview mode, but visible. Is it possible?

2 Likes