Jump to content
abdulqayyum

how can add custom field in front-end user login or register.

Recommended Posts

Dear processwire community,
i have a problem in loginRegister module, i could not add custom field in login and register page.
i read from plugin documentation. they are saying.
" By default, the email and password fields are required for both forms. You may want to add more fields. To do this, you’ll need to add fields to your “user” template. You can add fields to your user template in the admin by going to “Setup > Templates > Show system templates > user”.

but i could not find similar scenario like “Setup > Templates > Show system templates > user”
i can see just "Setup > Templates" not seeing "Show system templates > user" in my admin panel.

Please help me in this case that how i can add custom field in these two page.

Regards AbdulQayyum

image.png.71281b4681a279737ffc5b911996edee.pngimage.png.7cb377514d86a8ee8b6f5c5a8ecc980d.png

Share this post


Link to post
Share on other sites

Sorry, but I have added several fields to the user template.

I am then using:

$loginRegister = $modules->get('LoginRegister');
echo $loginRegister->execute();

But still I only get the email address and 2 x set password boxes. Have I forgotten something?

Share this post


Link to post
Share on other sites

Hi Dean,

Hopefully you've already found the answer, but you need to also visit Modules > Configure > LoginRegister and add those new user fields to "Registration form fields" so they display during registration.

  • Like 2

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By DanielKit
      Hi. I'm currently stuck at the login page in my project. Once I enter my admin username and my password and press login, nothing happens. The page just reloads. However, the URL changes from http://myipaddress/processwire to http://myipaddress/processwire/?login=1. I've checked all of my server settings, and to my knowledge, all seems to be fine there. I don't know where to go from here.. Thanks in advance!
    • By franciccio-ITALIANO
      Hi, I installed LoginRegister module. This is the instructions:



      But in Setup > Templates there isn't any templates > user.
      I don't know how to configure this module...
      Has anyone already tried it?
       
    • By Tyssen
      I have a client who is reporting that in the last couple of days they can no longer login to their site with their normal browser (Chrome). Using another browser or an incognito window works.
      I've tried logging into the site using the same login details in my usual browser (Firefox) and have had no problems.
      The site is a membership site and today other members are reporting the same problem.
      The site is running 3.0.148 and has the session handler DB and login throttle modules installed. It was recently upgraded to 3.x from 2.x. But no changes have been made to the site between the time when they were able to login OK and when the problem started happening.
    • By codevark
      The Minimal Site works fine, but if I try to login as admin, I have no idea what the credentials are.
      I did not do the "install" process myself. The OVA came with everything set up, but there's no mention of the PW admin credentials being set to some initial value.
      Wondering if anyone else has tried the Bitnami OVA and if there's a simple answer.
      --Pete
    • By Dean
      I don't seem to be able to add a role to a user when they register.
      I have a function to return the role as text based on the option that was chosen on the register form. I have checked that this function is returning the correct value by echoing it to the page. If I pass that text into the addRole function (as $myRole) it doesn't work. If I hard code the exact same text into addRole it does work.
      Do I need to change my getRole function to return the text in a different format?
      function getRole($role) { // return name of role based on id from register_member_role switch ($role) { case 1: return "type1"; break; case 2: return "type2"; break; case 3: return "type3"; break; default: return "type1"; } } $loginRegister = $modules->get('LoginRegister'); $myRole = getRole($input->post('register_member_role')); wire()->addHookBefore('LoginRegister::createdUser', function($event) { $u = $event->arguments[0]; $u->addRole($myRole); $u->save(); }); echo $loginRegister->execute();  
×
×
  • Create New...