Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/elements/README.txt,v
retrieving revision 1.1.4.1
diff -u -p -r1.1.4.1 README.txt
--- README.txt	2 Dec 2009 11:27:16 -0000	1.1.4.1
+++ README.txt	25 Jul 2010 03:05:05 -0000
@@ -11,6 +11,13 @@ Elements provided
 
 1. tableselect
 2. imagebutton (not working properly yet).
+3. number 
+4. tel
+5. range
+5. search
+7. url
+8. email 
+
 
 
 1. tableselect
Index: elements.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/elements/elements.module,v
retrieving revision 1.1.2.2.2.5
diff -u -p -r1.1.2.2.2.5 elements.module
--- elements.module	24 Mar 2010 21:36:46 -0000	1.1.2.2.2.5
+++ elements.module	25 Jul 2010 03:05:05 -0000
@@ -5,6 +5,40 @@
  * Implement hook_elements().
  */
 function elements_elements() {
+  $types['email'] = array(
+    '#input' => TRUE,
+    '#size' => 60, 
+    '#maxlength' => 128, 
+  );
+  $types['imagebutton'] = array(
+    '#input' => TRUE,
+    '#button_type' => 'submit',
+  );
+  $types['numberfield'] = array(
+    '#input' => TRUE,
+    '#min' => '',
+    '#max' => '',
+  );
+  $types['range'] = array(
+    '#input' => TRUE,
+    '#min' => '',
+    '#max' => '',
+  );
+  $types['search'] = array(
+    '#input' => TRUE,
+    '#size' => 60, 
+    '#maxlength' => 255,
+  );
+  $types['tel'] = array(
+    '#input' => TRUE,
+    '#size' => 10, 
+    '#maxlength' => 128,
+  );
+  $types['url'] = array(
+    '#input' => TRUE,
+    '#size' => 80, 
+    '#maxlength' => 128,
+  );
   $types['tableselect'] = array(
     '#input' => TRUE,
     '#js_select' => TRUE,
@@ -13,10 +47,7 @@ function elements_elements() {
     '#options' => array(),
     '#empty' => '',
   );
-  $types['imagebutton'] = array(
-    '#input' => TRUE,
-    '#button_type' => 'submit',
-  );
+
   return $types;
 }
 
@@ -25,16 +56,63 @@ function elements_elements() {
  */
 function elements_theme() {
   return array(
-    'tableselect' => array(
+    'email' => array(
       'arguments' => array('element' => NULL),
     ),
     'imagebutton' => array(
       'arguments' => array('element' => NULL),
     ),
+    'numberfield' => array(
+      'arguments' => array('element' => NULL),
+    ),
+    'range' => array(
+      'arguments' => array('element' => NULL),
+    ),
+    'search' => array(
+      'arguments' => array('element' => NULL),
+    ),
+    'tel' => array(
+      'arguments' => array('element' => NULL),
+    ),
+    'url' => array(
+      'arguments' => array('element' => NULL),
+    ),
+    'tableselect' => array(
+      'arguments' => array('element' => NULL),
+    ),
   );
 }
 
 /**
+ * Theme the email form element.
+ *
+ * @param array $element
+ *
+ * @return string
+ *   HTML representation of the email field.
+ */
+function theme_email($element) {
+  $size = empty($element['#size']) ? '' : ' size="'. $element['#size'] .'"';
+  $maxlength = empty($element['#maxlength']) ? '' : ' maxlength="'. $element['#maxlength'] .'"';
+  $class = array('form-email');
+  $output = '';
+
+  _form_set_class($element, $class);
+
+  if (isset($element['#field_prefix'])) {
+    $output .= '<span class="field-prefix">'. $element['#field_prefix'] .'</span> ';
+  }
+
+  $output .= '<input type="email"'. $maxlength . $required . ' name="'. $element['#name'] .'" id="'. $element['#id'] .'"'. $size .' value="'. check_plain($element['#value']) .'"'. drupal_attributes($element['#attributes']) .' />';
+
+  if (isset($element['#field_suffix'])) {
+    $output .= ' <span class="field-suffix">'. $element['#field_suffix'] .'</span>';
+  }
+
+  return theme('form_element', $element, $output) . $extra;
+}
+
+/**
  * Theme the imagebutton form element.
  *
  * @param array $element
@@ -54,6 +132,156 @@ function imagebutton_value() {
 }
 
 /**
+ * Theme the number form element.
+ *
+ * @param array $element
+ *
+ * @return string
+ *   HTML representation of the number field.
+ */
+function theme_numberfield($element) {
+  $min = empty($element['#min']) ? '' : ' min="'. $element['#min'] .'"';
+  $max = empty($element['#max']) ? '' : ' max="'. $element['#max'] .'"';
+  $class = array('form-number');
+  $output = '';
+  
+  _form_set_class($element, $class);
+
+  if (isset($element['#field_prefix'])) {
+    $output .= '<span class="field-prefix">'. $element['#field_prefix'] .'</span> ';
+  }
+
+  $output .= '<input type="number"'. $min .' name="'. $element['#name'] .'" id="'. $element['#id'] .'"'. $max .' value="'. check_plain($element['#value']) .'"'. drupal_attributes($element['#attributes']) .' />';
+
+  if (isset($element['#field_suffix'])) {
+    $output .= ' <span class="field-suffix">'. $element['#field_suffix'] .'</span>';
+  }
+
+  return theme('form_element', $element, $output) . $extra;
+}
+
+/**
+ * Theme the range form element.
+ *
+ * @param array $element
+ *
+ * @return string
+ *   HTML representation of the range field.
+ */
+function theme_range($element) {
+  $min = empty($element['#min']) ? '' : ' min="'. $element['#min'] .'"';
+  $max = empty($element['#max']) ? '' : ' max="'. $element['#max'] .'"';
+  $class = array('form-range');
+  $output = '';
+
+  _form_set_class($element, $class);
+
+  if (isset($element['#field_prefix'])) {
+    $output .= '<span class="field-prefix">'. $element['#field_prefix'] .'</span> ';
+  }
+
+  $output .= '<input type="range"'. $min .' name="'. $element['#name'] .'" id="'. $element['#id'] .'"'. $max .' value="'. check_plain($element['#value']) .'"'. drupal_attributes($element['#attributes']) .' />';
+
+  if (isset($element['#field_suffix'])) {
+    $output .= ' <span class="field-suffix">'. $element['#field_suffix'] .'</span>';
+  }
+
+  return theme('form_element', $element, $output) . $extra;
+}
+
+/**
+ * Theme the search form element.
+ *
+ * @param array $element
+ *
+ * @return string
+ *   HTML representation of the search field.
+ */
+function theme_search($element) {
+  $size = empty($element['#size']) ? '' : ' size="'. $element['#size'] .'"';
+  $maxlength = empty($element['#maxlength']) ? '' : ' maxlength="'. $element['#maxlength'] .'"';
+  $required = empty($element['#required']) ? '' : ' required';
+  $class = array('form-search');
+  $output = '';
+
+  _form_set_class($element, $class);
+
+  if (isset($element['#field_prefix'])) {
+    $output .= '<span class="field-prefix">'. $element['#field_prefix'] .'</span> ';
+  }
+
+  $output .= '<input type="search"'. $maxlength . $required . ' name="'. $element['#name'] .'" id="'. $element['#id'] .'"'. $size .' value="'. check_plain($element['#value']) .'"'. drupal_attributes($element['#attributes']) .' />';
+
+  if (isset($element['#field_suffix'])) {
+    $output .= ' <span class="field-suffix">'. $element['#field_suffix'] .'</span>';
+  }
+
+  return theme('form_element', $element, $output) . $extra;
+}
+
+/**
+ * Theme the telephone form element.
+ *
+ * @param array $element
+ *
+ * @return string
+ *   HTML representation of the telephone field.
+ */
+function theme_tel($element) {
+  $size = empty($element['#size']) ? '' : ' size="'. $element['#size'] .'"';
+  $maxlength = empty($element['#maxlength']) ? '' : ' maxlength="'. $element['#maxlength'] .'"';
+  $required = empty($element['#required']) ? '' : ' required';
+  $class = array('form-telephone');
+  $extra = '';
+  $output = '';
+
+  _form_set_class($element, $class);
+
+  if (isset($element['#field_prefix'])) {
+    $output .= '<span class="field-prefix">'. $element['#field_prefix'] .'</span> ';
+  }
+
+  $output .= '<input type="tel"'. $maxlength . $required . ' name="'. $element['#name'] .'" id="'. $element['#id'] .'"'. $size .' value="'. check_plain($element['#value']) .'"'. drupal_attributes($element['#attributes']) .' />';
+
+  if (isset($element['#field_suffix'])) {
+    $output .= ' <span class="field-suffix">'. $element['#field_suffix'] .'</span>';
+  }
+
+  return theme('form_element', $element, $output) . $extra;
+}
+
+/**
+ * Theme the url form element.
+ *
+ * @param array $element
+ *
+ * @return string
+ *   HTML representation of the search field.
+ */
+function theme_url($element) {
+  $size = empty($element['#size']) ? '' : ' size="'. $element['#size'] .'"';
+  $maxlength = empty($element['#maxlength']) ? '' : ' maxlength="'. $element['#maxlength'] .'"';
+  $required = empty($element['#required']) ? '' : ' required';
+  $class = array('form-url');
+  $extra = '';
+  $output = '';
+
+  _form_set_class($element, $class);
+
+  if (isset($element['#field_prefix'])) {
+    $output .= '<span class="field-prefix">'. $element['#field_prefix'] .'</span> ';
+  }
+
+  $output .= '<input type="url"'. $maxlength . $required . ' name="'. $element['#name'] .'" id="'. $element['#id'] .'"'. $size .' value="'. check_plain($element['#value']) .'"'. drupal_attributes($element['#attributes']) .' />';
+
+  if (isset($element['#field_suffix'])) {
+    $output .= ' <span class="field-suffix">'. $element['#field_suffix'] .'</span>';
+  }
+
+  return theme('form_element', $element, $output) . $extra;
+}
+
+/**
  * Create the correct amount of checkbox or radio elements to populate the table.
  *
  * @param $element
@@ -188,4 +416,4 @@ function theme_tableselect($element) {
     $rows[] = array(array('data' => $element['#empty'], 'colspan' => count($header)));
   }
   return theme('table', $header, $rows);
-}
+}
\ No newline at end of file
