SUBROUTINE FIELDSET
*Display a simple form, with name and address fields
*grouped as a fieldset

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

* Start the HTML page
CALL RW_START_HTML_PAGE("Name and Address Details", "", "", "", "")
* Start the HTML form, specifying that the subroutine FORMHF2
* should be run when the form is submitted
CALL RW_START_HTML_FORM("FORMHF2", "NAMEFORM", "")

CALL RW_PUT("Enter your name and address, then click Submit to continue")
CALL RW_NEWLINES(2)

* Create the editboxes
BUF="Name:    "
CALL RWA_EDIT_BOX(BUF,"NAME", 30,"")
CALL RWA_NEWLINES(BUF,1)
BUF=BUF:"Address: "
CALL RWA_EDIT_BOX(BUF,"ADD1", 30,"")
CALL RWA_NEWLINES(BUF,1)
BUF=BUF:"       "
BUF=BUF:"       "
CALL RWA_EDIT_BOX(BUF,"ADD2", 30,"")
CALL RWA_NEWLINES(BUF,1)
BUF=BUF:"       "
BUF=BUF:"       "
CALL RWA_EDIT_BOX(BUF,"ADD3", 30,"")
CALL RWA_NEWLINES(BUF,1)
BUF=BUF:"Postcode:   "
CALL RWA_EDIT_BOX(BUF, "PCODE", 7, "")
CALL RWA_NEWLINES(BUF,2)

*Tag these name and address boxes as a fieldset
CALL RWS_FIELDSET(BUF, "")

*Display the fieldset
CALL RW_PUT(BUF)

*Create the submit button
CALL RW_SUBMIT_BUTTON("Submit","")

*Complete the form
CALL RW_END_FORM

* Complete the page
CALL RW_END_PAGE
RETURN
ClosedResult
ClosedHTML