Forum

Thread tagged as: Problem, Error, Members

Perch Content doesn't work within Perch Member Form

perch_member_form('register.html');
//This is inside the above "register.html"
<perch:content id="register_disclaimer" type="textarea" label="Register Disclaimer" editor="redactor" html="true" size="xxl autowidth" />

The Perch Content Region won't show in CMS when inside Perch Member Form.

I created the region outside the form successfully and tried as a "Share across all pages" but still wouldn't output onto the page when inside Perch Member Form.

Any ideas? Thanks.

Using Perch Runway: 3.0.4, perch_members (1.6.1).

James Hazelton

James Hazelton 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That's right - perch_member_form() doesn't manage content. You need to use perch_content() for that.

The problem is that I have some disclaimer text that I would like editable in the CMS. It is below the Member Form Fields and above the Submit (so still inside the Member Form).

Drew McLellan

Drew McLellan 2638 points
Perch Support

You can create it in a region and then pass it into the member form.

Can you please expand? I thought I tried that in the way I would with any other inserts but it didn't work only when inside Member Form.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, like this:

PerchSystem::set_var('register_disclaimer', perch_content('Disclaimer', true));
perch_member_form('register.html');

I've just tried that, the content ID 'register_disclaimer' still won't output within perch_member_form? Not sure if is a bug at this point or what's left to try?

Hi James

I think the bit you might be missing is this...

Do this first, your template used for 'Region Name' should be setup to produce the required HTML for your dropdown:

PerchSystem::set_var('region_name', perch_content('Region Name', true));
perch_member_form('register.html');

Then within your Form template try this where your dropdown should appear:

<label>Choose Item from List</label>
<perch:content id="region_name" /> //this is the select box

I'm not sure if this will work - it's totally untested, but seems to follow the flow of the docs, as seen here:

https://docs.grabaperch.com/templates/passing-variables-into-templates/

That hasn't worked for me, you?

Drew McLellan

Drew McLellan 2638 points
Perch Support

The namespace for perch_member_form() is forms. So change <perch:content to <perch:forms.

That did it, thanks Drew!