I
I
Ivan Konkin2018-02-24 13:51:37
Drupal
Ivan Konkin, 2018-02-24 13:51:37

Drupal 7: How to change form attributes?

Let's say the login form is:

<form action="/user/login" method="post" id="user-login" accept-charset="UTF-8"></form>

How can I in the form: add or remove or change attributes? <form></form>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
afi13, 2018-05-31
@afi13

Use hook_form_alter() or hook_form_FORM_ID_alter() , in it you will get an array with form data, in which you can change everything you need, including form attributes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question