× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
custom fields
If you want them on user_settings you have to make those changes manually. If you want them on admin_user.php you can duplicate the example_admin_user_system_settings file removing example_.
Hello guys. I am having some trouble with my custom registration form. I added some additional fields to the database and made changes to the additional_join_form_field and the during_user_creation files like so:


<label for="street">Street*</label>
<input type="text" class="form-control input-sm" id="street" name="street" placeholder="Street" value="<?php if (!$form_valid
&& !empty($_POST)){ echo $street;} ?>" required autofocus>


$db->update(‘users’,$theNewId,[‘street’ =>Input::get('street']);

None of the additional fields I added were posted to the database.
I cannot get it to successfully update

I am just trying to follow the initial walkthru in the code notes using account_id

Error: An invalid form control with name='account_id' is not focusable.
Also, is there a way to trigger the during user creation functionality during update as well? I think I can hack something but would rather use the recommended practice
Hi there,

Sorry for the delay in getting back to you. during_user_creation is called during both regular registration and manual addition. Your code seems correct, to use the $theNewId variable and run the update command. That being said, is it producing any errors?

Add $dnd($db->errorInfo()) to your during_user_creation file after that command to see if it posts anything.
The only message i got is "There was a problem creating an account." I went ahead and tried modifying the _join form which works if I have three custom fields. If I exceed three custom fields, i get the message "There was a problem creating an account." I wish someone on this forum would share how they got it to work.
If there was a problem creating the account, there was more than likely an error that occurred during the insert. The new columns you added, are they nullable? If not, the insert is going to fail and that would be your issue.
It actual works with nullable columns but once I insert more than three fields into the users table I get the message “There was a problem creating an account".
All Null columns. It works fine with three custom fields but when I try to insert more than three custom field the message “There was a problem creating an account” appears again.
Right I have everything working on new users, both manual and register. I am focused on updating users. I need these new fields to be updatable and also trigger certain actions on update. Just wondering if there was a built in way versus hacking something. I got the field to appear via admin_user_system_settings.php but it will not update.

Forum Jump:

Users browsing this thread: 5 Guest(s)