H
H
Henry Chinasky2019-01-31 15:12:09
Drupal
Henry Chinasky, 2019-01-31 15:12:09

How to change the form in the module?

Good day.
You need to edit the form on Drupal 7, or rather insert the last saved values ​​(value) into the inputs.
Created a module folder (my_modules) with two extensions my_modules.info my_modules.modules.
In the file my_modules.modules I write the following code to display the id of the forms on the site:

function my_modules_alter(&$form, &$form_state, $form_id){
  dsm($form_id);
  print_r($form_id);
  print render($form_id);
}

To my regret, the code is not executed. Could you share your experience, what could be the problem?
PS - I included the module :)
PS2 - pulling from the database and inserting via JS does not need to be suggested :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andead, 2019-01-31
@andead

my_modules_ form _alter
RTFM

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question