Pregunta

I'm new in drupal 7, and I have to work on an existing project

i want to display a validation message of a webform.

In my custom node.tpl i have a webform with a unique validation on the email, but it's don't show any error message.

I think it was stored in "$messages", but nope.

How can i do this ?

Thanks.

¿Fue útil?

Solución

Wow that was easy, but so hard to fine ...

so here is my solution :

<ul style="color:red;">
<?php
foreach (form_get_errors() as $key => $value) {
?>
    <li>
        <?= $value ?>
    </li>
<?php
}

?>
</ul>
<?php
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top