summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstanley lieber <stanley.lieber@gmail.com>2011-10-03 09:39:45 -0500
committerstanley lieber <stanley.lieber@gmail.com>2011-10-03 09:39:45 -0500
commit88f938cbe77e3fb1a80830933c5e9e150b486508 (patch)
treeb93be2026c33b63727d68ab0428fa00830de4f39
parent001ce57253f99e1a988a630ddf6bb05815bace80 (diff)
downloadplan9front-88f938cbe77e3fb1a80830933c5e9e150b486508.tar.xz
mothra: <input type=""> default to text if no/invalid value
-rw-r--r--sys/src/cmd/mothra/forms.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/src/cmd/mothra/forms.c b/sys/src/cmd/mothra/forms.c
index 9c68b94ae..d6bdb91ba 100644
--- a/sys/src/cmd/mothra/forms.c
+++ b/sys/src/cmd/mothra/forms.c
@@ -169,8 +169,6 @@ void rdform(Hglob *g){
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 @@ void rdform(Hglob *g){
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");