Forum
Adding fields to back end
Hi guys,
I'm looking to add a couple of fields to the admin area of the Members app - ideally, it'd be a new form.
At the moment, I've added the fields in (Club Name, Sports, Description), but they're not auto-populating with info from the DB in the same way as the standard $Template
form does (First Name, Last Name etc.).
Also, on submitting, it clears the First Name and Last Name columns from the DB.
Any ideas?
Thanks, Harry
Are you adding these fields to the
member.html
template?Nope, I'm adding them basically by replicating (or trying to) the way that the
$Template
variable gets set inmembers.edit.pre.php
:That's not something that is supported, so I can't help you.
Hi Drew,
No worries - if I was to add them through the
member.html
template, would that be something that is supported?Yes, that's how it's designed to work.
Great - so just add the fields into the member.html template and it'll pull through and update as expected?
Yes that's how everything in Perch works, you should never have to touch Perch Core code or App Code. The reason we can't support that is that we then have no idea what you have done, so if you have been changing that code I would suggest starting with a clean copy of the App then modifying your templates as is described in the documentation.
https://docs.grabaperch.com/addons/members/template-tags/
Hi both,
Thanks for the help - I've undone all changes made and added those fields into the member.html template.
Now that they're in there, though, there's another issue - they don't pull information through from the DB, nor do they feed it back in on submission. They're just blank inputs at the moment.
How do we sync those fields up to the Database?
Thanks, Harry
Please post your template and Diagnostic Report.
Diagnostic Report:
member.html
template: