Results 1 to 2 of 2

Thread: Editview fields not saved

  1. #1
    emkay22 is offline Junior Member
    Join Date
    Sep 2011
    Posts
    5

    Default Editview fields not saved

    I created custom fields in the EditView of a custom module. For some of the fields I used customcode, in order to make them readonly.

    Question:
    1. Is there a way to write code for readonly fields without using customCode?
    2. When I make changes to editable fields, the data in the non-editable fields is wiped out from the database. How do i prevent this from happening? ie how do I ensure that all fields in editview are saved?

    Any help would be appreciated. Thanks!

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Editview fields not saved

    You just need to add the attribute displayParams that way:

    PHP Code:
    'displayParams' => array(
        
    'field' => array(
            
    'readonly' => 'readonly',
        ),
    ), 
    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Disable previous saved value in fields
    By anokirda in forum Developer Help
    Replies: 1
    Last Post: 2011-06-28, 02:03 PM
  2. custom fields are not being saved while upgrading
    By Rajas in forum Developer Tutorials
    Replies: 2
    Last Post: 2010-04-02, 01:59 PM
  3. no data being saved in custom fields
    By vaineh in forum Help
    Replies: 5
    Last Post: 2009-04-01, 10:41 AM
  4. Replies: 6
    Last Post: 2008-07-10, 04:18 PM
  5. Replies: 3
    Last Post: 2006-11-16, 09:40 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
  •