Results 1 to 7 of 7

Thread: Multiple choice custom field

  1. #1
    Simone is offline Sugar Community Member
    Join Date
    Mar 2006
    Posts
    12

    Default Multiple choice custom field

    Is it possibile to create a multiple choice custom filed?
    e.g. from a list of events from event1 to event9, this contact partecipated at event2, event5 and event7.
    Any suggestion?

    Thank you in advance.
    Simone

  2. #2
    Simone is offline Sugar Community Member
    Join Date
    Mar 2006
    Posts
    12

    Cool Re: Multiple choice custom field

    Anyone has a clue?

    Please, is very important to me. Any ideas? A workaround?

    Thakxxx!

    Simone

  3. #3
    aheuermann is offline Sugar Community Member
    Join Date
    May 2006
    Posts
    61

    Default Re: Multiple choice custom field

    I did something like this to organize the states that a company did business in. I have a text box to keep the state abbrv. this is also read-only. I then created a popup window with checkboxes for each state, The popup window reads in the current state list and sets them checked it listed. Then after the user checks and unchecks the desired states he clicks ok and the states are listed comma seperated in alphabetical order into the text box. I did this by using sugar to create the text field and then editing the html file myself to make the field read only and create the popup link. The value of the field can be captured using javascript.

  4. #4
    sadek's Avatar
    sadek is offline Sugar Team Member
    Join Date
    Sep 2005
    Posts
    244

    Default Re: Multiple choice custom field

    FYI - Radio buttons will be available via the Studio Layout Editor in SugarCRM 4.5

    -Sadek

  5. #5
    mrobertson is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    42

    Thumbs up Re: Multiple choice custom field

    Quote Originally Posted by aheuermann
    I then created a popup window with checkboxes for each state, The popup window reads in the current state list and sets them checked it listed.
    I've made myself one of these and it's working. Mostly
    I can't get the check boxes to check on loading the window

    function fillonload(){
    loadstring = opener.document.EditView.grouplist_member_c.value;
    loadedarray = loadstring.split("\n");
    for (i=0; i < loadedarray.length; i++){
    for (j=0; j < 15; j++){

    if (document.inputForm1.group[j].value == loadedarray[i]){
    document.inputForm1.group[j].checked = true;
    }
    }
    }
    }

    It has something to do with javascript not using the if statement correctly. If I type in a string instead of "loadedarray[i]" then it evaluates as true. If there is another way to mark my checkboxes as checked based on an array of values, I'd appreciate the help

  6. #6
    mrobertson is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    42

    Default Re: Multiple choice custom field

    I figured it out, apparently it doesn't like me using "\n" as a dividing char. if i use "; " it works happily

  7. #7
    wrightee is offline Member
    Join Date
    Jul 2006
    Posts
    5

    Default Re: Multiple choice custom field

    Quote Originally Posted by mrobertson
    loadedarray = loadstring.split("\n");
    Try loadstring.split("\\n"); ?

Thread Information

Users Browsing this Thread

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

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
  •