ref: 88f938cbe77e3fb1a80830933c5e9e150b486508
parent: 001ce57253f99e1a988a630ddf6bb05815bace80
author: stanley lieber <stanley.lieber@gmail.com>
date: Mon Oct 3 05:39:45 EDT 2011
mothra: <input type=""> default to text if no/invalid value
--- a/sys/src/cmd/mothra/forms.c
+++ b/sys/src/cmd/mothra/forms.c
@@ -169,8 +169,6 @@
f->name=strdup("no-name");}
}
- else if(cistrcmp(s, "search")==0)
- f->type=TYPEIN;
else if(cistrcmp(s, "checkbox")==0)
f->type=CHECK;
else if(cistrcmp(s, "radio")==0)
@@ -188,10 +186,8 @@
f->type=RESET;
else if(cistrcmp(s, "hidden")==0)
f->type=HIDDEN;
- else{- htmlerror(g->name, g->lineno, "bad field type %s, ignored", s);
- break;
- }
+ else
+ f->type=TYPEIN;
if((f->type==CHECK || f->type==RADIO) && !pl_hasattr(g->attr, "value")){free(f->value);
f->value=strdup("on");--
⑨