/ Published in: PHP
                    
                                        
Resizing fields using a custom module
You could also resize the field using a custom module.
For example, if you created mysite.module, you could use something like this to reduce the field size to 30 characters
                You could also resize the field using a custom module.
For example, if you created mysite.module, you could use something like this to reduce the field size to 30 characters
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
function mysite_form_alter(&$form, &$form_state, $form_id)
{
switch ($form_id)
{
case 'user_profile_form':
$form['account']['name']['#size'] = 30;
$form['account']['mail']['#size'] = 30;
break;
}
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                