Results 1 to 2 of 2

Thread: pb with boolean fields

  1. #1
    sugarIStheBEST is offline Junior Member
    Join Date
    Aug 2007
    Posts
    4

    Default pb with boolean fields

    Hi,

    I've made my owm layout, with personnal fields.

    no pb with text,integer, dropdown ...

    But with boolean, I don't know why, Sugar doesn't want to edit the value on the check in the database.

    Then , Editview layout are false.

    Can someone tell me why and suggest a solution ?

    Thanks

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: pb with boolean fields

    Try adding something like this in your Save.php for checkboxes:
    PHP Code:
        if(isset($_POST['is_admin']) && ($_POST['is_admin'] == 'on' || $_POST['is_admin'] == '1')) $focus->is_admin 1;
        elseif(empty(
    $_POST['is_admin'])) $focus->is_admin 0

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 2007-02-05, 09:43 PM
  2. You CAN massupdate non-dropdown fields
    By tj@estreet.com in forum Help
    Replies: 0
    Last Post: 2006-10-03, 05:01 PM
  3. Replies: 1
    Last Post: 2006-09-11, 03:38 PM
  4. Adding Custom Fields to a layout (3.5.1)
    By pSouper in forum Help
    Replies: 3
    Last Post: 2006-07-09, 02:10 PM
  5. new added fields don't appear
    By snue in forum Feature Requests
    Replies: 0
    Last Post: 2006-05-08, 08:19 AM

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
  •