Output category selected

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

    Code
    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:

    Code
    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?