Summary: I want to pull in Joomla field and input values from a category blog and insert them into a contact form.
Background: I have created an alternative menu item based on the category blog for some products. All the data is added to each article using Joomla custom fields. The article title is used as the product name, although I could add another custom field for this.
I then created another alternative menu item also based on the category blog for the same categories (parent and three child categories). The [new]_item.php shows just the product (article) name, its price - by referencing the 'Price' custom field (
<?php echo $this->item->jcfields->value; ?>)- and then two input fields, one for quantity and one for total price. The [new].php file has a grand total field (all totals are worked out using JS) at the end and of the file.
Doing it this way means that my client can add new or remove products from the first alternative menu item blog which then automatically adds them to or removes them from the order form, without having to touch any of the code.
Question: Is there a way to incorporate the relevant parts of the order form into a com_contact form override so that the complete order form with contact details can be submitted to the site owner and a copy emailed back to the submitter?