Forum
Passing A Variable Into Template Creates Blank Content Field
I'm passing a variable into a template:
PerchSystem::set_var('dataDestination', 'gen');
perch_content_custom('Dental Fees', array(
'template' => 'fees.html'
));
Then outputting this like so:
<h3 data-magellan-destination="<perch:content id="dataDestination" />">
<perch:content id="treatmentsHeading" type="text" label="Fees Name" />
</h3>
However this creates a blank edit field in the admin. Any ideas?
Try adding type="hidden"
That should do it.
I actually knew that! Thanks for the prompt Simon.