Made to Order Software Corporation Logo

MO Label Inside: Main Page

MO Label Inside Documentation

1.0

Summary

Introduction to the MO Label Inside module
Requirements
Installation
Security with this module.
Errors generated by this module.
Changes between versions
Copyright (c) 2011 Made to Order Software Corp.

Introduction to the MO Label Inside module

The MO Label Inside module was created by Made to Order Software Corporation.

Back to Summary

Requirements

MO Label Inside does not depend on any other modules, however, it requires the use of a newer version of jQuery to work satisfactorilly. At this point we use the same version as found in Drupal 7.

misc/jquery.js version 1.4.4 misc/jquery.form.js version 1.3.2

Without those version, you will get errors and the expected functionality will not show up... From what we can tell, upgrading to the newer version of jQuery has no side effect on other modules (it is expected to be 99% backward compatible.)

Back to Summary

Installation

In order to install this module:

  • Get Drupal 7.x and retrieve the jquery.js and jquery.form.js files
  • Copy the jQuery files in your Drupal 6.x installation
  • Extract the MO Label Inside tarball under sites/all/modules
  • On your server, feel free to delete the doc sub-folder (it is safe since it is just and only static HTML)
  • Go to admin/build/modules and select MO Label Inside
  • Go to admin/settings/mo_label_inside to setup the module

Once the jQuery library was upgraded and the MO Label Inside module was installed, you need to go to the module settings to make use of it. By default, nothing will be changed.

We created this module to change the user forms. By default the administration forms are unchanged and we suggest you leave it that way so you can always go to the settings without having to tweak your database manually (just in case something went wrong.)

The installation settings include 3 parts:

  • Administration flag
  • List of input element patterns
  • Default values

The administration flag should not be changed.

The list of input widget patterns is documented in the administration screen. There are examples of what you can write in the list of input element patterns:

 user|edit-name|focused_label=enter your login name
 user/login|edit-name|unfocused_label=click to enter your login name
 *|edit-mail|layout=front|focused_color=#999|undocused_color=#444
 

The current version supports a path, including <front>, one or more identifiers separated by commas, and the following optional variables:

  • layout -- set to either "front" or "behind"; it defaults to "behind" because when the label is pushed behind, it cannot be clicked on; however, that feature requires the input element to become transparent and that may not be acceptable (depending on whether the element has the same background color as the form background color)
  • focused_color -- the color of the label text when the input element has focus and no text was entered yet
  • unfocused_color -- the color of the label text when the input element does not have focus and no text was entered yet
  • focused_label -- the text of the label when the input element has focus and no text was entered yet
  • unfocused_label -- the text of the label when the input element has focus and no text was entered yet
  • input_width -- defines the width of the input element (i.e. 200px)
  • remove -- a string of text to remove from the default label text; it defaults to ":", but can be set to ": *" to also remove the required mark, or anything else to your liking (although using the unfocused_label may be easier, unless translations are important to you.)

The defaults available in the settings window can be used instead of these variables (especially useful if the majority, if not all of the input elements must be defined in the same way.)

Note that the input behavior as defined by the MO Label Inside module for Drupal 6.x is to match all the possible paths and mark all of those input as affected. If you define the same input element multiple times on the same page, the effects of this module are then undetermined.

Back to Summary

Security with this module.

There is no known security issue with this module. By default, only the administrator has access to the settings panel (there is a specific permission to allow/disallow users from editing the settings.)

Obviously, changing the label to something that is misleading is not a good idea, but it won't change the functionality of the text fields.

Back to Summary

Errors generated by this module.

The module prints out errors whenever an invalid parameter is found. If you can, work out the patterns to enter in the "List of input elements to transform" text area on a website that's is not your main website. Once they work to your liking, copy and paste the new patterns.

Back to Summary

Changes between versions

  • Version 1.0

* Initial version

Back to Summary

Copyright (c) 2011 Made to Order Software Corp.

http://www.m2osw.com/mo_label_inside contact@m2osw.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Back to Summary
Documentation generated by Doxygen on Mon Mar 28 22:50:29 2011