From 88f938cbe77e3fb1a80830933c5e9e150b486508 Mon Sep 17 00:00:00 2001 From: stanley lieber Date: Mon, 3 Oct 2011 09:39:45 -0500 Subject: mothra: default to text if no/invalid value --- sys/src/cmd/mothra/forms.c | 8 ++------ 1 file 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"); -- cgit v1.2.3