Results 1 to 3 of 3

Thread: add custom field to 'New Contact' shortcut form - and save data

  1. #1
    smueller72 is offline Sugar Community Member
    Join Date
    Jan 2005
    Posts
    125

    Default add custom field to 'New Contact' shortcut form - and save data

    Hi all - I have added a new custom dropdown field to Contacts. It's showing up and working fine on the edit/detail/search and list forms. However, we also want to add this field to the 'New Contact' form found on the Home page(at least in the Sugar and SugarLite) templates. This is the form that allows you to enter fname, lname, phone and email and click 'Save' to quickly setup a Contact.

    We have been able to edit the GetFormBody function in the ContactFormBase.php file to pull and display the custom field label however we cannot get the options from the custom field to display in the corresponding dropdown. Can anyone point us in the right direction as to how to get the custom field dropdown options to display? And, more importantly, once it displays how to save it to the table when the user clicks 'Save'. Any help would be greatly appreciated.

  2. #2
    smueller72 is offline Sugar Community Member
    Join Date
    Jan 2005
    Posts
    125

    Default Re: add custom field to 'New Contact' shortcut form - and save data

    Ok - We've got the values populating the custom drop-down on the 'New Contact' entry form now we can't get the value chosen to save to the database. Can anyone offer any help on saving custom field data?

  3. #3
    smueller72 is offline Sugar Community Member
    Join Date
    Jan 2005
    Posts
    125

    Default Re: add custom field to 'New Contact' shortcut form - and save data

    I've turned on debugging and found the lines below in the sugarcrm.log to be where the Insert is taking place:

    Mon Sep 12 13:31:14 2005,113 [22239] INFO SugarCRM - Query:INSERT INTO contacts_cstm (id_c ) VALUES ('1b22f192-dd01-2605-9909-4325bbdae30a' )
    Mon Sep 12 13:31:14 2005,114 [22239] INFO SugarCRM - Query Execution Time:0.000569
    Mon Sep 12 13:31:14 2005,116 [22239] INFO SugarCRM - Insert: INSERT into contacts set

    As you can see the Insert into the contacts_cstm table is only inserting the contact id and not the other custom field value set in the 'New Contact' shortcut form. Anyone have a clue what script that Insert statement can be found in and, more importantly, how to add additional values to it to be written to the contacts_cstm table? Any help would be greatly appreciated.

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
  •