I
I
Igor2017-09-14 11:13:18
AJAX
Igor, 2017-09-14 11:13:18

How to style form validation in Drupal?

In form validation, there is such a wonderful function drupal_set_message, which displays an error message, displaying text for an incorrect field. But what if I want to go and change the style of this field so that it is highlighted in red? In other words, how to change the style of the field with an error?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2019-05-28
@Rsa97

It looks like your test page is returning the result in JSON, not HTML.

M
Mambli Joe, 2019-05-28
@Mambli-Joe

Apparently, if you want to insert the content of the test page, then you need to write test.html (well, or whatever extension you need). And in this form ('/test/') looks like the path to the folder test.5ced140bb1208678546241.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question