Output category selected

  • I have a template which allows a category to be chosen for a product in the control panel.

    1. <perch:categories id="shopcategories" label="SELECT ONE OR MORE CATEGORY" set="shop-categories" required display-as="checkboxes">

    The template also displays a product image and a buy now button.

    I want to feed the chosen category into the buy now button code but can't work out how to do this.

    The section of code in the buy now button is:

    1. <input type="hidden" name="product[]" value=" CHOSEN CATEGORY WOULD GO HERE ">

    Can anyone suggest how I can do this in the html template please?

  • Thank you for your reply.

    The function isn't crucial but it is mainly for the client rather than the customer.

    On reflection it may be best to move the form from the template to the product page which is php and send from there.