Commit 660534b9 authored by Jelle Sebreghts's avatar Jelle Sebreghts
Browse files

updated readme, moved configuration to configuration page

parent b671efae
......@@ -4,11 +4,29 @@ Description
===========
This module allows you to add clientside validation to forms and webforms.
Usage
=====
The only thing this module will do is translate validation rules defined in php to javascript counter parts,
if you mark a field as required it will create a javascript rule that checks the field on submit. This means
no configuration is needed. You can however configure the prefix and suffix used for the field names in the
error messages (e.g.: prefix:", suffix:" or prefix:<<, suffix:>>) and whether or not to use the minified version
of jquery.validate.js.
You can find an example here: http://drupal.org/sandbox/jelles/1193994
Dependencies
============
- none
Known problems
==============
- Clientside Validation (Main module): none
- Clientside Validation Webform:
* Clientside Validation
* Webform (http://drupal.org/project/webform)
- Clientside Validation Form:
* Clientside Validation
- Clientside Validation FAPI:
* Clientside Validation
* FAPI Validation (http://drupal.org/project/fapi_validation)
CCK Multivalue checkboxes cannot be checked, see code
TODO
====
- Allow user to select to which forms the validation has to be added
- Add settings to control position and behaviour of the error messages
......@@ -6,6 +6,8 @@ package = Other
files[] = clientside_validation.module
configure = admin/config/validation/clientside_validation
; Information added by drupal.org packaging script on 2010-12-25
version = "7.x-1.x-dev"
core = "7.x"
......
......@@ -9,7 +9,16 @@
* Implements hook_menu().
*/
function clientside_validation_menu() {
$items['admin/structure/clientside_validation'] = array(
$items['admin/config/validation'] = array(
'title' => 'Validation',
'description' => 'Validation settings.',
'position' => 'right',
'weight' => -10,
'page callback' => 'drupal_get_form',
'page arguments' => array('clientside_validation_admin_settings'),
'access arguments' => array('access administration pages'),
);
$items['admin/config/validation/clientside_validation'] = array(
'title' => 'Clientside Validation',
'description' => 'Administer clientside validation.',
'page callback' => 'drupal_get_form',
......@@ -65,7 +74,7 @@ function clientside_validation_admin_settings() {
$form['clientside_validation']['example_image'] = array(
'#type' => 'item',
'#title' => t('Example'),
'#value' => '<img id="clientside_validation_example_image" src="' . base_path() . drupal_get_path('module', 'clientside_validation') . '/errormsg.png" alt="' . t('Error message example') . '" />',
'#markup' => '<img id="clientside_validation_example_image" src="' . base_path() . drupal_get_path('module', 'clientside_validation') . '/errormsg.png" alt="' . t('Error message example') . '" />',
'#description' => t('Filling in double quotes in both the above fields will give this result.'),
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment