How to add custom css flash messages

I want to add diferent error mesages to my form.

We need more information than that to help you... How is your form created? How and where do you want the messages displayed?



16.0k

I have simple Registration Form. I am trying to use in phalcon index view and I want validation to that form along with Messages (Flash) which implemented in phalcon invo app.

On 8/8/14, Rewt0r <[email protected]> wrote:

We need more information than that to help you... How is your form created? How and where do you want the messages displayed?

--

Thanks and Regards, Rakesh Bitling [email protected] 7276165575

Have you enabled the flash service? If you have and you have set a flash message you just need to add {{ flash.output() }} if you're using Volt.



16.0k

I have enabled flash but i have my own css , js I dont want to use bootstrap related js and css Pls help me how to implement in my simple login form

You could use $this->flash->setAutomaticHtml(false); maybe this is what you're looking for?

edited Aug '14
$di = new FactoryDefault();
$di->set('flash', function () {
    return new Flash(array(
        'error' => 'css_class',
        'error2' => 'css_class',
        'warning' => 'css_class',
        'success' => 'css_class',
        'notice' => 'css_class'
    ));
});