Ver Mensaje Individual
  #7 (permalink)  
Antiguo 31/07/2013, 08:57
rogama
 
Fecha de Ingreso: marzo-2012
Ubicación: Madrid
Mensajes: 37
Antigüedad: 12 años
Puntos: 0
Respuesta: Formulario de registro personalizado (Drupal 7)

Te Volveria a dar las gravias por el aporte anterior, pero se quedan cortas, eres un monstruo; lo que intentaba con
Cita:
$form['name']['#title'] = t("Custom title");
$form['name']['#weight'] = 1000;
$form['actions']['submit']['#value'] = t("CREA UNA CUENTA");
$form['actions']['submit']['#weight'] = 1;
era quitar el titulo al campo name, y ponerlo en ultimo lugar, al boton cambiarle el texto y ponerlo en primer lugar

eso ha quedado solucionado con:
Código:
$form['account']['name']['#title'] = t("Custom title");
            $form['account']['name']['#weight'] = 1000;
            $form['account']['name']['#description'] = t("");
            
            $form['actions']['submit']['#value'] = t("CREA UNA CUENTA");
            $form['actions']['submit']['#weight'] = 1;
Ahora solo me queda el problema del tpl, intento mostrarlo con este codigo:
Código:
function insurance_theme(&$existing, $type, $theme, $path) {
   $hooks['user_login_block'] = array(
     'template' => 'templates/user-login-block',
     'render element' => 'form',
   );
   $hooks['user_register_form'] = array(
       'arguments' => array('form' => NULL),
     'template' => 'templates/user-register',
       'render element' => 'form',
   );
   return $hooks;
 }
function insurance_preprocess_user_register_form (&$variables) { 
    $variables['form'] = drupal_build_form('user_register_form', user_register_form(array())); 
}
tengo dentro de la carpeta templates un archivo llamado:
user--register.tpl.php como me comentas al ser drupal 7; su contenido es este (uno cualquiera que e sacado de algun sitio de internet) para probar
Código:
<h1>Testing that this is my own user registration form</h1>
<?php print render($form['form_id']); ?>
<?php print render($form['form_build_id']); ?>

<?php 
print render ($form['field_firstname']);
print render ($form['field_lastname']);
print render ($form['field_dob']);
print render ($form['name']);
print render ($form['mail']);
print render ($form['pass']);
print render ($form['timezone']);
print render ($form['form_token']);

print drupal_render($form['actions']); ?>

<input type="submit" name="op" id="edit-submit" value="Create"  class="form-submit" />
pero no me muestra ese formulario