Results 1 to 3 of 3

Thread: How to make field "Other Phone" required in Users module

  1. #1
    Softbless is offline Senior Member
    Join Date
    May 2010
    Posts
    25

    Default How to make field "Other Phone" required in Users module

    Hi Guys,

    I've tried several times to make Field Other Phone in User module to be required.

    I've made new file custom/extension/modules/Users/Ext/Vardefs/vardefs.php that contain :

    PHP Code:
    <?php
    $dictionary
    ['Users']['fields']['phone_other']['required'] = true;
    ?>
    But it's not working.

    My 2nd try to edit modules/Users/field_arrays.php

    I change
    PHP Code:
    'required_fields' =>   array("last_name"=>1,'user_name'=>2,'status'=>3), 
    to become :

    PHP Code:
    'required_fields' =>   array("last_name"=>1,'user_name'=>2,'status'=>3'phone_other'=>4), 
    Is there anybody could give a hint? Even if it's not upgrade safe customization, I'll be willing to consider

    Any help would be very appreciated

  2. #2
    eitrix's Avatar
    eitrix is offline Sugar Community Member
    Join Date
    Aug 2010
    Location
    Serbia
    Posts
    396

    Default Re: How to make field "Other Phone" required in Users module

    edit the editview.php file and add the tag for required field. Check out other required fields and you will see what i am talking about
    CRM Software Engineer
    Eontek - www.eontek.rs

  3. #3
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: How to make field "Other Phone" required in Users module

    Hello,

    Un-upgrade safe manner -->

    modules/Users/Forms.php in

    function verify_data add following lines

    PHP Code:
    if (trim(form.phone_other.value) == "") {
                    
    add_error_style('EditView',form.phone_other.name,
                
    '{$app_strings['ERR_MISSING_REQUIRED_FIELDS']} {$mod_strings['YOUR_ERROR_MESSAGE']}' );
            
    isError true;
            } 
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 2009-07-14, 11:28 AM
  2. Replies: 6
    Last Post: 2009-05-10, 03:58 PM
  3. Search 2 custom field like "any email" / "any phone"
    By johnwoo in forum General Discussion
    Replies: 1
    Last Post: 2007-10-29, 02:17 AM
  4. Replies: 0
    Last Post: 2007-07-27, 08:13 AM
  5. Replies: 0
    Last Post: 2005-10-22, 05:23 AM

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
  •