2013-09-15, 03:47 PM
2013-09-15, 08:42 PM
Go to ACP>>Templates & Styles>>Templates>>Your Template>>User Control Panel Templates>>usercp_profile_customtitle
Find:
and replace with:
Modify this according to your needs: minlength="5"
Find:
<td><input type="text" class="textbox" name="usertitle" size="25" maxlength="{$mybb->settings['customtitlemaxlength']}" value="{$newtitle}" /></td>
and replace with:
<td><input type="text" class="textbox" name="usertitle" size="25" minlength="5" maxlength="{$mybb->settings['customtitlemaxlength']}" value="{$newtitle}" /></td>
Modify this according to your needs: minlength="5"
2013-09-16, 02:34 PM
Thanks for your reply, but wont that set a minimum for them all?? I only want a minimum for 1 of the 3 that I have just created
2013-09-18, 08:38 AM
Anyone else?
2013-09-18, 04:41 PM
No it will only set the minimum value to that particular line which is customtitle
2013-09-19, 09:00 AM
Ok im slightly confused now.
I have created 2 new fields for my registration, (Im guessing you call these custom profile fields?)
I want a minimum on both of them, but a different minimum amount. here is the code as per FireBug
Now if I change the
ACP>>Templates & Styles>>Templates>>Your Template>>User Control Panel Templates>>usercp_profile_customtitle
From:
to:
then surely it will add a minimum length, with that minimum length being the same on both?
I have created 2 new fields for my registration, (Im guessing you call these custom profile fields?)
I want a minimum on both of them, but a different minimum amount. here is the code as per FireBug
<input id="fid1" type="text" class="textbox" name="profile_fields[fid1] size="0" maxlength="8" value=""">
<input id="fid4" type="text" class="textbox" name="profile_fields[fid4] size="0" maxlength="30" value=""">
Now if I change the
ACP>>Templates & Styles>>Templates>>Your Template>>User Control Panel Templates>>usercp_profile_customtitle
From:
<td><input type="text" class="textbox" name="usertitle" size="25" maxlength="{$mybb->settings['customtitlemaxlength']}" value="{$newtitle}" /></td>
to:
<td><input type="text" class="textbox" name="usertitle" size="25" minlength="5" maxlength="{$mybb->settings['customtitlemaxlength']}" value="{$newtitle}" /></td>
then surely it will add a minimum length, with that minimum length being the same on both?
2013-09-19, 12:06 PM
Just add minlength="your minimum value"
2013-09-19, 07:13 PM
(2013-09-19, 12:06 PM)marcus123 Wrote: [ -> ]Just add minlength="your minimum value"
how does that work when mybb loops through the custom user fields array ? the OP needs different minimum length value for each field not just a fixed minimum length ... the answer is perhaps a small plugin to add the value when mybb loops
2013-09-20, 01:45 PM
Yea I did try marcus but it didnt work, I put min lengh as 10 and it still allowed me to register with 3 characters.