How do I render a custom form in page--front.tpl.php? I have a custom form with a button.

function mymodule_get_subscribed_form($form, $form_state) {
    $form['actions']['submit'] = array(
        '#type' =&gt; 'submit',
        '#value' =&gt; t('Submit'),
    );
    return $form;
}


Now I want render this button on the front page. I've wrote this code in page--front.tpl.php.

print render(drupal_get_form('mymodule_get_subscribed_form'));


It doesn't work with Drupal 7.54, even after clearing the cache.
It might be because of variables being passed by reference. Try this instead:

$form = drupal_get_form('mymodule_get_subscribed_form');
print drupal_render($form);