How to preallocate form I'm using the Follow module and I'd like to modify the form, where I can preallocate the beginning of the form, like in the picture shown below:



May I know how can this be done?
You need to make a custom drupal module then implement a form alter to add a #field_prefix to the form element.

In this case specifically, it would be like this:

/**
 * Implements hook_form_alter().
 */
function MODULE_NAME_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'FORM_ID') {
    $form['FIELD_NAME']['#field_prefix'] = t('PREFIX_TEXT');
  }
}


You will need to change the following in that code sample to suit your form:
MODULE_NAME: The name of your custom drupal module.
FORM_ID: The form id of the form you want to alter. In this case the forward form.
FIELD_NAME: The machine name of the field you want to add a prefix to.
PREFIX_TEXT: The text you want to put in front of the field.

To work out the form id of the form you want to alter, install the devel module, and just inside your form alter function add the following line:

dpm($form_id);


Now whenever you load a page you will see the form ids for all the forms on the current page, so go to the page with the forward form and you will see the form id.

To get the field machine name of the field you want to add the prefix to you use the same method.

So after you have added the form id to the code sample, then just inside that if statement add:

dpm($form);


Then when you go to the page with the form on it you will get a display of the form, which you can click to expand.
Expand it and you will see a list of the form elements in the form, the keys are the machine names of the elements.

When you are done you can remove the dpm() calls and uninstall the devel module.