Is it possible to echo form radio button as a default?

liunx

Guest
I know noone understood what that meant. You know how you can set a default selection for "select"(select) and "checkbox"(checked) inputs in an html form? Well is it possible to make a radio button as a default? I have an edit script that echos the content a person submits back into a form for them to make any changes. I figured out how to do the "select" and "checkbox" with an "if" function. But they can have a default set in html. I can change the radio buttons to checkboxes if I have to but I'd like to use the radio buttons. Thanks.isnt it just checked="checked" for radio buttons too?Hmmm, I haven't even tried that. It's getting very late tonight but I'll check tomorrow afternoon. Thanks. :)don't even need checked=checked

just

<input type=radio checked>

that is allThanks n8thegreat and scoutt. I just checked and yes it does work. Sometimes the simplest things can drive me nuts. :Dif you want to be xhtml compliant you have to do checked="checked", i just do everything in xhtml out of habitbut if you have the html doctype and not xhtml than some of that will make html not run right.:-/ its always worked for me with an html doctype :Dwell than try this.

have a html doctype and in your meta tags and your link tag put a /> at the end. you have to have them if you want XML standard. it will mess up the html as it is cancelling the rest of it below the link or the meta tags.

let me find that threadhere a quote from giz

Originally posted by Giz
Yeah it is valid XML but it is not valid HTML.

The first / seen after <head> in an HTML document is interpreted as </head><body> which leads to all the rest of the META data, scripts and styles within the <head> being flagged as errors, as they are seen to incorrectly located within the <body> section. When the real <body> tag is encountered, this flags a further error as it is then seen to be a duplicate tag.
 
Back
Top