Results 1 to 4 of 4

Thread: Checkbox unchecking upon edit

  1. #1
    w00tfest99 is offline Junior Member
    Join Date
    Jan 2007
    Posts
    4

    Default Checkbox unchecking upon edit

    I'm incredibly new to Sugar (system was implemented by someone before me and now I'm in charge of supporting it) and I ran into a problem.

    I'm using SugarSuite v4.2.0d

    The problem is that when any user goes in to edit their account, a checkbox that was checked in the details view is now unchecked. The field this is happening on is the field that says whether to authenticate against LDAP or not. Here is the raw HTML that it is happening on.

    <td width="15%" class="dataField"><slot><input name='is_ldap_user' class="checkbox" tabindex='3' type="checkbox" value='1' {IS_LDAP_USER_DISABLED} {IS_LDAP_USER}></slot></td>

    I checked in the database to make sure that it's set to be an LDAP user and it is. Also, the field is disabled so both conditions should be true.

    Is there something I'm missing that could be causing this switch to occur? Any help would be appreciated.

  2. #2
    cywolf's Avatar
    cywolf is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Toronto, Canada
    Posts
    223

    Default Re: Checkbox unchecking upon edit

    Disabled fields aren't submitted with the form. I would try adding a hidden field with the same name immediately before it (the checkbox, when enabled, would override its value):

    <input name='is_ldap_user' type="hidden" value="{IS_LDAP_USER}">

    On the other hand, the code to save the user shouldn't be trying to update that field when the editing user isn't allowed to change its value.
    Andrew Whitehead
    The Long Reach Corporation
    http://infoathand.com

  3. #3
    w00tfest99 is offline Junior Member
    Join Date
    Jan 2007
    Posts
    4

    Default Re: Checkbox unchecking upon edit

    I think disabled fields are being submitted. Because when the user goes into the edit screen the checkbox becomes unchecked and then when they save any changes it saves that setting to the database too even though the checkbox is disabled.

  4. #4
    w00tfest99 is offline Junior Member
    Join Date
    Jan 2007
    Posts
    4

    Default Re: Checkbox unchecking upon edit

    Upon further investigation, this is happening with all checkboxes that are disabled. They are all set up the same way as the one detailed before.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Where is the 'Edit in Place' Button??
    By Attard in forum Help
    Replies: 0
    Last Post: 2006-11-15, 02:26 PM
  2. Checkbox fields in subpanels?
    By wesblake in forum Help
    Replies: 0
    Last Post: 2006-09-07, 12:48 AM
  3. Saving Edit view problem.
    By matt22 in forum Help
    Replies: 1
    Last Post: 2006-02-09, 12:15 PM
  4. Checkbox Issue...
    By Thierry in forum Developer Help
    Replies: 3
    Last Post: 2005-05-09, 02:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •