Results 1 to 7 of 7

Thread: Adding Required Fields v5.0b

  1. #1
    jeffbrumbaugh is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    20

    Default Adding Required Fields v5.0b

    Hello, I have read through the WIKI and trolled through the Forums on how to add required fields. I have updated the modules/modname/vardefs.php file and the /cache/modules/modname/editview.tpl files accordingly. I have the pretty red asterik, but the field is not required. Here is the code from the vardefs.php file:

    'refered_by' =>
    array (
    'name' => 'refered_by',
    'vname' => 'LBL_REFERED_BY',
    'required' => true,
    'type' => 'varchar',
    'len' => '100',
    'comment' => 'Identifies who refered the lead',
    'merge_filter' => 'enabled',

    Any thoughts?

  2. #2
    dpatech is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    NC
    Posts
    287

    Default Re: Adding Required Fields v5.0b

    Have you tried the Admin -> Repair -> Clear Vardefs Data Cache and then check only the clear vardefs checkbox. After doing go back to page for that module so it refreshes the vardefs. Then check the file cache/modname/modname_vardefs.php to see if the required flag exists for the field in this file.
    - Sugar Team
    dpa Technology LLC
    e-mail: dpaDeveloper@dpatechnology.com
    web: http://www.dpatechnology.com

  3. #3
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Adding Required Fields v5.0b

    Did you set the required flag in fields_meta_data table in the database for this entry?

  4. #4
    jeffbrumbaugh is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    20

    Default Re: Adding Required Fields v5.0b

    Yes, I've done the repair-clear vardefs data cache (actually read that online). Still have the same issue. I checked the cached version and it is set for required.

  5. #5
    dpatech is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    NC
    Posts
    287

    Default Re: Adding Required Fields v5.0b

    You don't have a default value defined for the field do you? What gets saved in the database if it is saved empty?
    - Sugar Team
    dpa Technology LLC
    e-mail: dpaDeveloper@dpatechnology.com
    web: http://www.dpatechnology.com

  6. #6
    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: Adding Required Fields v5.0b

    Hi, jeffbrumbaugh

    Try setting the system to developer mode.

    Cheers

    --
    André Lopes
    Lâmpada Global Services
    Rua Bela Cintra, 299 conjunto. 51
    São Paulo, SP 01415-000
    tel1. 55 11 3237-3110
    cel. 55 11 7636-5859
    e-mail: info@lampadacrm.com.br

  7. #7
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Adding Required Fields v5.0b

    If the cached version is set for required, you only forgot to to Repair the JS Files.
    The JS Files are used for the presentation on the panels.

    Regards
    Harald Kuske


    500

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2007-01-30, 11:34 AM
  2. Replies: 1
    Last Post: 2006-09-11, 03:38 PM
  3. Adding Custom Fields to a layout (3.5.1)
    By pSouper in forum Help
    Replies: 3
    Last Post: 2006-07-09, 02:10 PM
  4. sugar42 required fields
    By maykelrr in forum Developer Help
    Replies: 0
    Last Post: 2006-04-05, 05:47 PM
  5. Blank required fields still saving
    By eggsurplus in forum Help
    Replies: 1
    Last Post: 2005-12-19, 04:43 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
  •