Jump to content

How to add some custom fields on the user profile?


LeiHa
 Share

Recommended Posts

First of all, thank you all who made great CMS/CMF like this.

I've been trying to remake my community site and searched new CMS tools.

Now that I've found ProcessWire.

Even though I'm not quite good at PHP coding as a Designer, I'd like to learn about using ProcessWire.

Great concept, fascinating design, and fast.

So, here is my question.

I've been looked through some of tutorials and followed some of them.

By following these, I can see how easy is making portfolio, blog site. so far.

Now, I need to move onto the creating community site.

How do I add some custom user fields?

Not only showing these fields on the front-end site, but also showing the back-end admin pages.

I can't edit the admin template pages in order to add custom fields without coding PHP(I guess).

If there is the way I don't know of, I'd love to hear them all.

Basically I have a lot of questions coming.(making custom registration. maybe)

Link to comment
Share on other sites

Hi LeiHa and welcome here!

Pw is also great to learn some basic PHP, so I'm sure it's the right choice for you.

Back to your question.

You can add any fields to the User like to other templates in ProcessWire. In fact, Users are also Pages (like everything) and have their own template called "User".

In your admin-panel, go to Setup > Templates. Click on "Filters" and show the System Templates. Now you can edit the User-Template and add your custom fields.

In your frontend, you output them the same way as other fields. For the current user and the email-field, this would be:

echo $user->email;
  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...