Results 1 to 3 of 3

Thread: Quick question on making a field "required"

  1. #1
    ndaniels is offline Sugar Community Member
    Join Date
    Nov 2006
    Posts
    24

    Default Quick question on making a field "required"

    Sugar 4.2 OS
    I know that it's pretty easy to make a custom field required from Studio. Is there any corresponding way to make a built-in field required ("Industry" in "Accounts", for example) without hacking the php?

  2. #2
    pblag's Avatar
    pblag is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Ukraine (Chernivtsy)
    Posts
    347

    Default Re: Quick question on making a field "required"

    Hello!

    It's really simple to do but i don't now how to do it in Studio.

    You have to add line
    'required'=>true,

    in the file
    modules\Accounts\vardefs.php

    so code should be like below

    'industry' =>
    array (
    'name' => 'industry',
    'vname' => 'LBL_INDUSTRY',
    'required'=>true,
    'type' => 'enum',
    'options' => 'industry_dom',
    'len'=>25,
    ),

    If you have any questions you can ask me online just click on link below
    Live Help

    Thank you,
    Petro Blagodir.
    blagodir@gmail.com

  3. #3
    malcolmh's Avatar
    malcolmh is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Aug 2004
    Posts
    1,712

    Default Re: Quick question on making a field "required"

    HI,

    In addition to the previous post, you also need to add the following to the HTML file to display the field as mandatory

    <span class="required">{APP.LBL_REQUIRED_SYMBOL}

    Hope this helps
    Cheers Malcolm

    Genius4U Limited - Ingenious simple IT solutions for you / Genial einfache IT Lösungen für Sie
    http://www.genius4u.com or http://www.genius4u.de

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
  •