We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
Create Form based on Collection content
I'm trying to create a form that will create a set of form items based on the contents of a Collection. The aim is to allow users to register interest in items from a Collection of products.
I'm calling the collection to get the form output I need and then passing this into my form. Here's the collection call:
opts_bikes = perch_collection('Rentals Facts', [ 'template' => 'collections/_rentals-form-options.html', ], true);
And then I set it as a variable to pass into the form template:
And finally I have my form template:
<perch:form id="bookings-form" method="post" class="" app="perch_forms"> <perch:forms id="opts_bikes" encode="false" /> <perch:input type="submit" value="Search" /> </perch:form>
The output on the front-end is as I need it and devTools shows the form inputs with the is and labels as expected. The form will also submit and register in Perch. But I don't get any form content through — the user's form input isn't displayed in the Forms admin.
Is what I'm trying to do possible? Should I be able to see the user's form input? Am I taking the right approach here?
Many thanks in advance for any help.
Want to reply to this thread?Login with Perch