Download & Extend

If the input does not have a type, default to text?

Project:SimpleTest
Version:7.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:RoloDMonkey
Status:needs review

Issue Summary

I am using DrupalRemoteTestCase to test a non-Drupal site. Unfortunately, this site sometimes relies on the fact that browsers will assume that input tags without a type are text inputs.

For cases like this, should this code in handleForm:

<?php
       
switch ($type) {
          case
'text':
          case
'textarea':
          case
'hidden':
          case
'password':
           
$post[$name] = $edit[$name];
            unset(
$edit[$name]);
            break;
?>

Be changed to this?

<?php
       
switch ($type) {
          case
'input':
          case
'text':
          case
'textarea':
          case
'hidden':
          case
'password':
           
$post[$name] = $edit[$name];
            unset(
$edit[$name]);
            break;
?>

I'm not completely sure I like this solution. Instead, maybe there should be a property on the class for whether or not you want to allow this?

nobody click here