How to edit forms in Perch CMS
I wrote this post a while back. The content can still be relevant but the information I've linked to may not be available.
How can I enable a client to edit form fields via the admin area of Perch CMS? This cannot be achieved dynamically (where you pull in some content from another area of the site) but you can add some editability to a form's
select input element using the following code. Here, I want the client to be able to edit the Subject input of their Contact form.
<perch:label for="subject">Subject</perch:label> <perch:input type="select" id="subject" options="<perch:content id="subjectoptions" type="text" label="Subject" help="Add subjects separated by commas" />" />
<perch:label> tag is what I would normally use in any form but the
<perch:input> tag has a
<perch:content> region in place of the options list. This means that, in Perch admin, the client can simply add a comma separated list to populate the
select input on the front end of the site.
- I wrote this up because I saw this post in the Perch forum and I needed something similar on my client's site.