refactoring of the form data processing

* now a for loop, where we iterate over the keys of the queries dict
* when a key is found in the form queries, we set it to the form value