Direct forms without using HTML forms/input fields?

Hello,

for our organisation I created an E-Mail form generator that uses an XClass as data structure and automatically generates an HTML form out of that. The names of the input fields and XClass properties are the same. Then the script is intercepting the $request (as far as I understood HTTP Post) and is using the XClass again, parsing the $request parameters to be propper velocity variabels again, and then processes the values and then lastly send an E-Mail of the processed stuff. Very important for us is that users can use these E-Mail forms without being logged in to our XWiki!

Of course this is quite inefficient and tiresome as it is using two different logics of fields and values. For example:
When my XClass that I use as data structure has an date field, my script creates an input field for datetime local. The date value in the $request has an very specific syntax and needs to be parsed with $datetool.toDate to make it an proper velocity date variable again that I can then use to make it pretty and send it in the E-Mail.

The minimalistic abstract example code for HTML forms that send mails and don’t require users to be logged in into XWiki:

{{velocity}}
#if($request.action == 'send_mail')
  #set ($allParameters = $request.getParameterNames())
  #foreach ($parameter in $allParameters)
    $request.getParameterValues($parameter)
    ##DO STUFF, PREPEARE STUFF FOR MAIL CONTENT
  #end
  ##MAIL STUFF HERE
$message = $services.mailsender...
#end

{{html}}
<form action="" method="post">
  <input name="action" value="send_mail" type="hidden" />
  <input fields"/> 
  </div>
  <fieldset>
    ##INPUT FIELDS HERE
    <input fields ...>
  </fieldset>
  <span class="buttonwrapper"><input type="submit" class="button" value="Send mail" /></span>
  <span class="buttonwrapper"><input type="reset" class="button" value="Reset" /></span>
</form>
{{/html}}
{{/velocity}}

Can somebody tell me if there is an easier way, that doesn’t use the detour with HTML input fields and $request and that WITHOUT creating XObjects that would require more than just read rights on that page?

I found examples for XWiki forms, which directly show XClass property fields (which have some nicer pickers than HTML input fields), but all these examples create new Objects like instances of a class ore entire XWiki Pages - one example is the FAQ application.
However I have not found a way yet to use these direct form fields for an simple mail-form that guests can use.

In short what I have in mind is like using the exact nicer form fields that are directly shown, when using $doc.display($property.name, 'edit', $xobject). And then directly using the user input after he clicked an “submit” button to process the data and send it via mail.

And all that without the detour of creating html input fields and without using $request and all without creating new objects/pages - The goal is just to send mails.