Hello Drupals! I have tried wrap my head around form problem, but I'm new to Drupal and don't know I'm doing wrong (and English not very good sorry) Below is my code to customize User => Edit => user-profile-form. I feel I am 0.75 there. Everything is working expected so far but I don't know how to submit the form haha o.O
Here is template.php
<?php
/**
* Implementation of hook_theme().
*
*/
function MYTHEME_theme($existing, $type, $theme, $path){
return array(
'user_profile_form' => array(
'render element' => 'form',
'template' => 'user-profile-form',
'path' => drupal_get_path('theme', 'MYTHEME') . '/templates',
),
);
}
/**
* Preprocessor for user-profile-form.tpl.php
*
*/
function MYTHEME_preprocess_user_profile_form(&$vars) {
$vars['school'] = drupal_render($vars['form']['field_user_school']);
$vars['team'] = drupal_render($vars['form']['field_user_team']);
// IS THIS SUBMIT BUTTON VARIABLE WRONG???
$vars['submit'] = $form['actions']['submit']['#submit'] = array('#id' => 'edit-submit', '#type' => 'submit', '#value' => 'Save',);
}
/**
* Implementation of hook_form_FORM_ID_alter().
*
*/
function MYTHEME_form_user_profile_form_alter(&$form, &$form_state, $form_id) {
//dpm($form);
drupal_set_message($form_id . " is currently hooked.");