Forum
Move content region outside of a form?
Hi, I have inherited a Perch site that someone else built, and I am changing an existing form that used the official forms addon to just an embedded html code from our CRM system.
The form has an editable header message, which was coded in the template using <perch:content id="intro" label="Introduction message" type="textarea" textile="true" size="m" />
. (Note that this is just straight-up content and has nothing to do with the form functionality itself.)
I have now moved that perch:content tag out of /admin/templates/content/forms/my_form.html into just /admin/templates/my_page.php. I also removed the surrounding <perch:form>
tag. Now the message is not appearing on the page. I'm guessing that taking it out of the <perch:form>
tag is what caused this problem.
My question is: what do I need to do to get that content appearing on the page outside the context of the <perch:form>
tag. I've re-saved the content in an effort to clear the cache, but that has had no effect. Is this a setting of some kind, or am I now using the wrong code to get that content to actually appear on the page?
Thanks for your help.
You're using the wrong code. Those are template tags, so they need to go in a template. I'd also suggest putting the form tags back in, otherwise your form won't work.
Thanks for the reponse.
I don't need the form tags back, because this is just pasted code for salesforce (it is just an HTML form that posts to an external server).
I'm a little unfamiliar with how perch uses the terminology, so pardon the confusion... but I think what I'm asking is "how do I put an editable field onto a php page at the top-level of my site"? (I think what you're saying is that those php files are not called "templates" in perch... I'm not sure what they're called but surely there's some way to have these editable fields' content get displayed on them?)
This is probably a good place to start: https://docs.grabaperch.com/docs/content/
You need to add a region to your page. That region then uses a template that contains one or more fields.