2009-07-06, 07:49 AM
Perhaps this belongs in the Code Modifications forum, but I will go ahead and post it here. It could be both.
Anyway, I don't like how MyBB sticks all custom profile fields into the same table, so I am editing few templates to my liking. This topic deals with the "User Control Panel Templates > usercp_profile_profilefields" template.
The problem is, when a user goes to /usercp.php?action=profile, fills out the custom profile fields and hits the "Update Profile" button, although their profile updates, the Control Panel doesn't remember their selections for the next time they choose to update their profile. In other words, their profile updates, but their Control Panel doesn't remember these updates. Make sense?
I'm relatively positive I simply need to make a small code change to the <select> and <input> tags (such as adding value="some sort of variable" or whatnot), but I don't know what it is.
Would anyone be willing to help? Here's a simplified portion of what I have (I deleted what was already there):
Thanks.
Anyway, I don't like how MyBB sticks all custom profile fields into the same table, so I am editing few templates to my liking. This topic deals with the "User Control Panel Templates > usercp_profile_profilefields" template.
The problem is, when a user goes to /usercp.php?action=profile, fills out the custom profile fields and hits the "Update Profile" button, although their profile updates, the Control Panel doesn't remember their selections for the next time they choose to update their profile. In other words, their profile updates, but their Control Panel doesn't remember these updates. Make sense?

I'm relatively positive I simply need to make a small code change to the <select> and <input> tags (such as adding value="some sort of variable" or whatnot), but I don't know what it is.
Would anyone be willing to help? Here's a simplified portion of what I have (I deleted what was already there):
<br />
<fieldset class="trow2">
<legend><strong>Stats</strong></legend>
<table cellspacing="0" cellpadding="4" width="100%">
<tr>
<td>
<span class="smalltext"><a title="Your rank." style="text-decoration: none;">Rank</a>:</span>
</td>
</tr>
<tr>
<td>
<select name="profile_fields[fid4]" size="1"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select>
</td>
</tr>
<tr>
<td>
<span class="smalltext"><a title="Your location." style="text-decoration: none;">Location</a>:</span>
</td>
</tr>
<tr>
<td>
<input type="text" name="profile_fields[fid5]" class="textbox" size="0" maxlength="50" />
</td>
</tr>
</table>
</fieldset>
Thanks.
