fbpx
Welcome, Guest
Username: Password: Remember me

TOPIC: custom fields in register form

custom fields in register form 2 weeks 2 days ago #27992

  • oihvil
  • oihvil's Avatar
  • Offline
  • New Member
  • Posts: 1
  • Karma: 0
Hello forum, im using the astroid template one and i want to know how to add or delete customs fields in the register and login user.
aslo how to add a menu in center of header, here prnt.sc/yztw6k
The administrator has disabled public write access.

custom fields in register form 2 weeks 20 hours ago #28025

  • nishtha
  • nishtha's Avatar
  • Offline
  • Moderator
  • Posts: 2167
  • Thank you received: 190
  • Karma: 29
Hi,

If you want the menu items in the center then you can use the Horizontal Center or Stacked Separated header styles in Astroid.

And adding and deleting the custom fields in a register/login form about that @admin can help you on this.

Thanks,
Nishtha
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.

To know more about products check out the their documentation.
The administrator has disabled public write access.

custom fields in register form 1 week 5 days ago #28056

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4252
  • Thank you received: 623
  • Karma: 112
oihvil wrote:
Hello forum, im using the astroid template one and i want to know how to add or delete customs fields in the register and login user.
aslo how to add a menu in center of header, here prnt.sc/yztw6k

Hi,

Customizing the registration form is not a core feature but can be done with 3rd party extensions. Here is a quick tutorial I found.
www.tassos.gr/joomla-extensions/convert-...er-registration-form

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

custom fields in register form 3 days 20 hours ago #28295

  • Andres27
  • Andres27's Avatar
  • Offline
  • New Member
  • Posts: 1
  • Karma: 0
oihvil wrote:
Hello forum, im using the astroid template one and i want to know how to add or delete customs fields in the register and login user.
aslo how to add a menu in center of header, here prnt.sc/yztw6k/ PrepaidCardStatus

Go to Behavior > PHP Scripts > After Form Submission and place the following PHP code into the After Form Submission field.

function addJoomlaUser($username, $name, $email, $password, $groups, $activate = false)
{
jimport('joomla.user.helper');

$groups = is_string($groups) ? explode(',', $groups) : (array) $groups;

$data = [
'name' => $name,
'username' => $username,
'password' => $password,
'password2' => $password,
'email' => JStringPunycode::emailToPunycode($email),
'groups' => $groups
];

if (!$activate)
{
$hash = JApplicationHelper::getHash(JUserHelper::genRandomPassword());
$data = $hash;
$data = 1;
}

// Load the users plugin group.
JPluginHelper::importPlugin('user');
$user = new JUser;

if (!$user->bind($data))
{
throw new Exception($user->getError());
}

if (!$user->save())
{
throw new Exception($user->getError());
}

return $user;
}

// Gather submitted data
$username = $submission->params;
$name = $submission->params;
$password = $submission->params;
$email = $submission->params;

// Create Joomla User Account
$new_user = addJoomlaUser($username, $name, $email, $password, '2');

After you have added the above PHP snippet you can Save your Form. Now your users will get registered once they fill your form but their accounts wont enabled and require to be enabled and activated by an admin.
Last Edit: 2 days 20 hours ago by Andres27.
The administrator has disabled public write access.
Moderators: chandandeep
Time to create page: 0.770 seconds
Cron Job Starts