XML and HTML Forms
Posted on 2000-03-14
I have a XML document that I am combining with and XSL document to produce an HTML document. This is creating a form that with the information from the XML document filling out the form, i.e. <Name>Paul</Name> ends up creating a textbox with Paul written in the textbox.
This part of the document is fine, the problem that I am having is with the Checkboxes section. I want to have one of the pieces of information displayed as checkboxes or option buttons. So basically I have <CarBenefits>Auto Program</CarBenefits> and on the page I have two option buttons one that says Auto Program and one that says 29 Cents Per Mile. I want the Option Button that has the same Value as the what is in the CarBenefits tag to be selected.
Here is what I have
<input type="radio" value="Auto Program" name="CarBenefits">Auto Program
<input type="radio" name="CarBenefits" value="Twenty Nine Cents Per Mile">29 Cents Per Mile