SUBROUTINE RADIO2
* Simple form including 3 groups of radio buttons.

* Include the RealWeb definitions
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP

* Start the HTML page.
CALL RW_START_HTML_PAGE("Form with Radio Buttons", "", "", "", "")

BUF = "Please enter your name in the box:"
CALL RWS_PARA(BUF, "", "")

FRM = ""

* Create an editbox.
CALL RWA_EDIT_BOX(FRM, "EDITBOX", 30, "3")
CALL RWA_NEWLINES(FRM, 2)

FRM = FRM : "Please tell us where you get most of your books:"

* Display group of 3 radio buttons.
* The first button will be the default.
CALL RWA_NEWLINES(FRM, 1)
CALL RWA_RADIO(FRM, "source", "S", 1, "")
FRM = FRM : "High Street Bookshop"
CALL RWA_NEWLINES(FRM, 1)
CALL RWA_RADIO(FRM, "source", "I", "", "")
FRM = FRM : "Internet Bookshop"
CALL RWA_NEWLINES(FRM, 1)
CALL RWA_RADIO(FRM, "source", "L", "", "")
FRM = FRM : "Local Library"
CALL RWA_NEWLINES(FRM, 2)

* Create the submit button.
CALL RWA_SUBMIT_BUTTON(FRM, "Submit Details", "")

* Create the HTML form, specifying that the subroutine THANKS should
* be run when the submit button is clicked.
CALL RWS_FORM(FRM, "THANKS", "FORM2", "")

BUF = BUF : FRM

* Output the form.
CALL RW_PUT(BUF)

* Complete the page.
CALL RW_END_PAGE
RETURN