Forum
perch:member not showing value in template
I have below code in a form where i want to show first name and last name above the form. But the value does not show up.
I am however able to echo same value in layout (.php) file using "perch_member_get('first_name')" I don't know what is wrong below.
<perch:member id="first_name" /> <perch:member id="last_name" />
<perch:form id="contact" method="post" app="perch_forms">
<center><perch:content id="intro" type="textarea" label="Intro" textile="true" editor="markitup" size="m" /></center>
<div>
<perch:label for="name">Name</perch:label>
<perch:input type="text" id="name" required="true" label="Name" value="<perch:member id="first_name" /> <perch:member id="last_name" />" />
<perch:error for="name" type="required">Please add your name</perch:error>
</div>
Which page function are you using to display the form?
pages/default.php has
layouts/default.php has below
and in admin area, I have selected contact.html for content area
perch_content()
is cached at edit time, so you'll need to useperch_content_custom()
.I tried replace perch_content with perch_content_custom, but i still don't get variables.
I have same problem in another site, here is forum link https://forum.grabaperch.com/forum/09-15-2016-template-variables-not-passing
Can you show us your diagnostics report?