Issue Bug Closed

#68558jsfunc.updateform.js is not compatible with field type "email"

aimcom no-lastname-given 07/27/15, 18:29 updated 10/26/17, 15:49

Description

The universal formupdate-function (jsfunc.updateform.js) ignores the new HTML5 field types (e.g. “email”).

Perhaps using the case for “text”, “textarea”, etc. as default could be an option:

    switch(type) {
        case "checkbox":
            fObj.checked = ((value && value!=0) ? "on":"");
            break;
        case "select-one":
            var l=fObj.length;
            for (a=0;a<l;a++) {
                if (fObj.options[a].value == value) {
                    fObj.selectedIndex = a;
                }
            }
            break;
        case "select-multiple":
            var l=fObj.length;
            for (a=0;a<l;a++) {
                if (fObj.options[a].value == value) {
                    fObj.options[a].selected = 1;
                }
            }
            break;
        case "radio":
            var l=fObj.length;
            for (a=0; a<l;a++) {
                if (fObj[a].value==value) {
                    fObj[a].checked = 1;
                }
            }
            break;
        case "text":
        case "textarea":
        case "hidden":
        case "password":
        default:
            fObj.value = value;
            break;
    }

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.