melinda's blog

Adding placeholders / text for the inside input elements of Drupal 7 View Exposed Filters / exposed forms blocks

Here's the code you add to the template.php

function your_theme_name_form_alter(&$form, &$form_state, $form_id){

if($form_id == "views_exposed_form"){// not to be changed form_id
if (isset($form['title'])) { //title is name attribute value of input
$form['title']['#attributes'] = array('placeholder' => array(t('keywords')));


When Drupal 7 view rewrite field as link does not work

If using rewite as link as node/ [nid] you need to be sure that Node: Nid is added as a field. Set it to 'exclude' from display. Make sure that Node: Nid comes first in the fields section.

Bootstrap CSS for radio buttons on Drupal 7 registration page

For all who had issues getting the Drupal 7 Bootstrap theme radio buttons on the registration form to behave.

<div class="form-type-radio form-item-field-whatever">
<input type="radio" id="edit-field-whatever-field" name="field_whatever" value="no" class="form-radio" /> <label for="edit-field-whatever-field">No </label>

#edit-field-whatever-field {
margin-left: 0;

CSS selector is the radio button's ID


Subscribe to RSS - melinda's blog