⎕SE.SALT.Load 'HRUtils'
And define the function 'SimpleForm' as per paragraph 2.4 of HTMLRenderer User Guide:
r←SimpleForm args;evt;html;req;resp;who
:If 0∊⍴args ⍝ Setup
html←'<title>A Simple Form</title>'
html,←'<form method="post" action="SimpleForm"><table>'
html,←'<tr><td>First: </td><td><input name="first"/></td></tr>'
html,←'<tr><td>Last: </td><td><input name="last"/></td></tr>'
html,←'<tr><td colspan="2"><button>Click Me</button></td></tr>'
html,←'</table></form>'
evt←'Event' 'HTTPRequest' 'SimpleForm'
'hr'⎕WC'HTMLRenderer'('HTML'html)('Coord' 'ScaledPixel')('Size'(200 400))evt
:Else ⍝ handle the callback
req←#.HRUtils.Request args ⍝ create a request from the callback args
who←req.Get¨'first' 'last' ⍝ retrieve from the form data
who←∊' ',¨who
req.Response.Content←'<h2>Welcome',who,'!</h2>' ⍝ set the content for the response
r←req.Respond ⍝ return the formatted response
:EndIf
and run the function you get the following error:
SimpleForm ''
VALUE ERROR: Undefined name: Request
SimpleForm[11] req←#.HRUtils.Request args ⍝ create a request from the callback args
The method 'Request' does not exist in namespace 'HRUtils'. Would it be possible to get an updated version of the function 'SimpleForm' or is it the namespace 'HRUtils' that is outdated ?
Thanks in advance.