Solved: 3 Years, 8 Months, 2 Weeks ago Custom field in registration
Solved: 3 Years, 8 Months, 2 Weeks ago
Ok, since nobody lent a hand, I've found my own answer after 3 days of hundreds of minor changes and attempts...

So, in the member_registration_agreement template I added:
<input type="hidden" name="uuid" value="{$mybb->input['uuid']}" />
Before the </form> tag.

Then I added a field in the member_register template:
<td colspan="2"><input type="text" class="textbox" name="uuid" id="uuid" style="width: 100%" value="{$mybb->input['uuid']}" readonly/></td>

NOTE the readonly, disabled will not work for the form submission process, it will pass a blank variable.
It is read only so it can't be fiddled with, it can only use the data passed in through the URL.

Next, I edited inc/datahandlers/user.php. I found:
"usernotes" => ','

And added on the next line:
"uuid" => $db->escape_string($user['uuid'])

Then I edited /member.php, added:
"uuid" => $mybb->get_input('uuid'),

after line:
"regcheck2" => $mybb->get_input('regcheck2'),

Lastly, I edited the MyPhpAdmin database, under mybb_users and added a field called 'uuid' to the structure.

There you go, if anyone needs to add a custom line in the registration that needs data passed in, I've saved you a mental breakdown! Big Grin

Messages In This Thread
Custom field in registration - by Sethgandy - 2017-12-24, 04:16 AM
RE: Custom field in registration - by Sethgandy - 2017-12-27, 02:49 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)