Submitted by Art Williams on Fri, 02/17/2012 - 9:01am

@jj: There are no additional modules. In the fieldtext.js file you'll inlude the jQuery statements for the field you want to prepopulate and what text you want inside it. Here is an example for the search block:


jQuery(document).ready(function($) {
 
    /** Form Prefill Example Text ***/
    $('form#search-block-form input.form-text').example('Search this site');

  });

This is a normal jQuery type statement identifying the element using css classes and IDs then executing the example() function which then takes the text as an argument.

The link I posted earlier has extensive documentation on the example() function.

Hope that helps.
-Art

The content of this field is kept private and will not be shown publicly.

Plain text

  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.