Preset and lock 'account preferences' ?
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #7
RE: Preset and lock 'account preferences' ?
Something like that.

For a disabled input fields, if you disable directly the original input, maybe the value of the input fields won't be saved (personally, I don't really like using readonly attribute for a checkboxes). That's why I use an hidden input fields, combined with a dummy input fields.

Something like this (member_register template):

HTML Code
<input type="checkbox" class="checkbox" name="allownoticesdummy" id="allownoticesdummy" value="1" checked="checked" disabled="disabled" />
<input type="hidden" name="allownotices" id="allownotices" value="1" />


Then, set the value in $user['options'] array in member.php (if you're not sure whether a user can change the value of the hidden input fields or not):

PHP Code:
149
"allownotices" => 1,


03-05-2012 05:34 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Preset and lock 'account preferences' ? - RateU - 03-05-2012 05:34 AM

 Standard Tools
Forum Jump: