• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 667
  • Last Modified:

Add static text after Drupal7 submit login button

Dear experts,

I´ve been struggling learning the form api to add content to the login form.
I am trying to add markup after the login button, but it keeps appearing above it.

Here is the markup I have so far:

      function adaptivetheme_subtheme_form_alter(&$form, $form_state, $form_id) {
        if($form_id == 'user_login') {
          //Add the required field(s).
            $form['name']['#prefix'] =  
            '<div id ="welcome">Welcome!</div>';
            $form['submit']['#suffix'] =  
            '<div id ="bpf_footer">This is suppose to go below the login button.</div>
            <div id="footer">
            <p>&copy;  All Rights Reserved.</p>
            <div class="legal-class">
                        <a href="terms">Terms of use</a>

Attached goes an screenshot of the login form. Could you please give me any insight?

Thank you very much,

1 Solution
glepizaAuthor Commented:
Ok, I resolved it, it seems that instead of  $form['submit']['#suffix'] = I should have removed the submit parameter : $form['#suffix'] =

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now