I'm trying to add two links on custom user form.
The goal is this links to be displayed bellow the submit button. 
I've tried with weight property, but it's not working. 

What do I miss?

This is my code:

&lt;?php
      function custom_alter_form_alter (&amp;$form, &amp;$form_state, $form_id) {

        switch ($form_id) {
                case 'user_login':

                $form['name']['#title'] = t('Username');
                $form['pass']['#title'] = t('Password');
                $form['actions']['submit']['#value'] = t('Login');
                $form['actions']['submit']['#weight'] = 0;

                $form['page'] = array(
                '#markup' =&gt; '&lt;h2&gt;Login&lt;/h2&gt;',
                '#weight' =&gt; -10,
                );

                $form['register'] = array(

                '#type' =&gt; 'markup',    
                '#markup' =&gt; '&lt;div class="user-login-register"&gt;You don't have an account?
                &lt;a class="user-login-register" href="/user/register"&gt;  Click here&lt;/a&gt;&lt;/div&gt;',
                '#weight' =&gt; 1,
                );

                $form['password_reset'] = array(
                '#markup' =&gt; '&lt;a class="user-login-password-reset" href="/user/password"&gt; You forgot your password&lt;/a&gt;',
                '#weight' =&gt; 2,
                );

                //krumo($form); 
                break;
            }

        }



Question: Ubuntu dual boot OS crashed my computer. Now my computer won't boot. Please Help
Answer: Boot off the USB disk or CD-ROM used to install Ubuntu (make sure it's the same version as you have installed).

First, you need to determine what device Ubuntu was installed on. The best way to figure this out is to run Gparted and find the disk that has the ext4 parition. Next to it should be /dev/sdaX (where X is the partition number). Write this down as you'll need it later.


Open a terminal (Ctrl+Alt+T)
sudo mount /dev/sdaX /mnt
sudo grub-setup -d /mnt/boot/grub /dev/sda
exit, restart and boot off your HDD


If that doesn't fix your problem, try this:


Open a terminal (Ctrl+Alt+T)
sudo mount /dev/sdaX /mnt
sudo mount --bind /dev /mnt/dev
sudo mount -t proc none /mnt/proc
sudo mount -t sysfs none /mnt/sys
sudo mount -t devpts none /mnt/dev/pts
sudo chroot /mnt (You should now see ubuntu@ubuntu:/# as your prompt)
sudo grub-setup /dev/sda
Exit and boot off your HDD