Answer the question
In order to leave comments, you need to log in
How to set id for submit button in Drupal 7?
In the form node, the code looks like this:
<?php print drupal_render($form['submitted']['name']); ?>
<?php print drupal_render($form['submitted']['phone']); ?>
<?php
print ("Заявка");//test
print drupal_render($form['submitted']);
print drupal_render_children($form);
function nameform_alter(&$form, &$form_state) {
$form['actions']['submit'] = array('#id' => 'lid1');
}
Answer the question
In order to leave comments, you need to log in
function name_alter(&$form, &$form_state) {
$form['actions']['submit']['#attributes']['id'] = "lid1";
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question