MyBB Community Forums

Full Version: Default custom field?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For this, I am usingĀ Latrodectus 's OOC vs IC differentials code. Using this to create different profiles per player/character accounts. At the moment, users who have not selected 'player' or 'character' (due to the code) do not have any avatar/postbit information.

How would you set a default choice for a custom field (ex. accounts w/ no choice made are players)? Since I'm transferring over from another platform, it looks like I can't force this in the database and users aren't throw into a custom field group by default, despite requiring such.
I'm not entirely sure but you could make the selection choices mandatory and provide a third option (yes, no, maybe) and assign information based on the 'maybe' variable - but that would only apply to new user registrations.

You could perhaps assign them into additional usergroups as well as an option.
(2024-03-19, 10:41 AM)MattyWjeisz Wrote: [ -> ]I'm not entirely sure but you could make the selection choices mandatory and provide a third option (yes, no, maybe) and assign information based on the 'maybe' variable - but that would only apply to new user registrations.

The issue that the selection is mandatory/required as a custom field, but due to the transfer over from another forum platform, the custom field variable is undefined on all of the old users. So, yes, it would only apply to new users.

(2024-03-19, 10:41 AM)MattyWjeisz Wrote: [ -> ]You could perhaps assign them into additional usergroups as well as an option.
Hm, how would I go about that? Wouldn't the 'registered' group override the custom field if used in an 'if/else' situation?

Ha, I figured it out. Something like...

<if ($variable['fidIDHERE'] == 'OPTION' || $variable['fidIDHERE'] == NULL) then>

Thank you for the assistance!