Thanks to Christophe Demko, Joomla supports the ability to dynamically add custom fields to the built-in contact form. This is accomplished via plugin using the
onContentPrepareForm event. With this, we can create highly customized contact forms, and apply the same principles to other core forms on both the site and admin side of the site.
You can download the example form plugin used in this post at https://github.com/betweenbrain/Custom-Contact-Form-Plugin (ZIP file) and the plugin that adds custom field data to the core email at https://github.com/betweenbrain/Email-Additional-Fields (ZIP file)Read more: Fun with Joomla Forms