Forms per email

Ha Vincent,

Thank you for the reply! I’ve read that page but it leads to no aswer for me. But as I said, I’m new to xwiki and its programming languages…

What I’m trying to accomplish is that I want to make a HTML form with different input types like textfield, radio’s, dropdowns etc. in xWiki and send it to an e-mailadres. So far I’m only capable of sending 1 textfield… Below is a simple example which works. But I want to use more input types, AND I want to make them up in the “to be send” e-mail…
I hope this is somewhat clearer…

{{velocity}}
#if("$!{request.action}" == 'send_mail' && "$!{request.lastname}" == '')
  #if("$!request.subject" != '')
    #set ($message = $services.mailsender.createMessage("no-reply@xwiki.domain.nl", "r.mulder@domain.nl", $request.subject))
    #set ($discard = $message.addPart("text/plain", "$!request.message"))
    #set ($result = $services.mailsender.send([$message], 'database'))
  #else
    {{error}}Onderwerp is verplicht!{{/error}}
  #end
#end
#if ($services.mailsender.lastError)
  {{error}}$exceptiontool.getStackTrace($services.mailsender.lastError){{/error}}
#end
#set ($statuses = $result.statusResult.getByState('FAILED'))
#if ($statuses.hasNext())
  {{error}}Error: $statuses.next().error{{/error}}
#end
{{html wiki=true}}
<form action="" method="post">
  <input name="action" value="send_mail" type="hidden" />
    ## Botvangertje
  <div class="hidden">
  <input name="lastname" type="text" /> 
  </div>
  <fieldset>
    <input type="hidden" name="recipient" value="r.mulder@domain.nl"/><br />
    **Onderwerp:**<br />
    <input type="text" name="subject" /><br />
    **Bericht:**<br />
    <textarea name="message" style="width:99%;" rows=10>Bericht opties.</textarea>
  </fieldset>
  <div>
    <span class="buttonwrapper"><input type="submit" class="button" value="Verzenden" /></span>
    <span class="buttonwrapper"><input type="reset" class="button" value="Wissen" /></span>
  </div>
</form>
{{/html}}
{{/velocity}}