Actually, I show a bootFlash widget, is it the same as alert? how to use it?

Cheers,

Daniel

Hey Daniel,

You don't need to register anything else besides Bootstrap itself in your layout. The widgets will register the necessary files themselves. Also, you can register BootFlash by adding the following code to the layout/view where you want to display the flash messages.

<?php $this->widget('ext.bootstrap.widgets.BootFlash'); ?>

If your flash message categories are set to 'success', 'info', 'warning' and 'error' this will display you flash messages. You can also set the keys manually by setting them in the widget configuration array and passing them as the second argument to the widget method.

I hope this helps. Please let me know if there are any future problems.

You don't need to register anything else besides Bootstrap itself in your layout. The widgets will register the necessary files themselves. Also, you can register BootFlash by adding the following code to the layout/view where you want to display the flash messages.

<?php $this->widget('ext.bootstrap.widgets.BootFlash'); ?>

If your flash message categories are set to 'success', 'info', 'warning' and 'error' this will display you flash messages. You can also set the keys manually by setting them in the widget configuration array and passing them as the second argument to the widget method.

I hope this helps. Please let me know if there are any future problems.

Hi Chris,

Thank you very much for your prompt and helpful response. One suggestion, why the flash is automatically closed? Any options to set the flash not closed automatically?

Disregard last post since I re-think and it would be unwise to display error message summary as BootAlert. The reason is that the BootAlert will be hidden/closed after some times. Instead, I just set the error message text as "Failed on ......" as the information and let the error for each attribute shown next to the textfield

As your instruction on the previous message I can display the error message upon ajax call. BootAlert is displayed as expected. However, one thing that is annoy me a little bit. The BootAlert is not closed automatically. I need to press on "X" to close the error message. If not closed, it will stack to each other.

Just have to say that this extension is amazing and having just got the flash message set up and running I am blown away. I was in the process of putting a similar set of css/tools together when I found your extension.