http://forum.osticket.com/d/discussion//queries-from-forms
Form data is a bit more complicated than it looks. See above for details of fetching ticket data, you'll need to adapt the query to work with users/organisations. Let me know if you get stuck.