Results 1 to 2 of 2

Thread: Required field verify not working in opportunities

  1. #1
    aschaeffer is offline Sugar Community Member
    Join Date
    Oct 2006
    Location
    Vienna, Austria
    Posts
    35

    Default Required field verify not working in opportunities

    Hi,

    I've chaned the opportunity module (I added some custom fields and edited the layout, EditView.html) and the Required fields - verify is not working anymore. This means I can actually save my opportunities even without puting a name...

    In opportunities/field_arrays.php (where I didn't change anything) I have:
    'required_fields' => Array('name'=>1, 'date_closed'=>2, 'amount'=>3, 'sales_stage'=>4, 'account_name'=>5),

    In opportunites/forms.php (where I didn't change anything) I have:
    ...
    function get_validate_record_js () {

    }

    /**
    * Create HTML form to enter a new record with the minimum necessary fields.
    * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
    * All Rights Reserved.
    * Contributor(s): ______________________________________..
    */
    function get_new_record_form () {
    require_once('modules/Opportunities/OpportunityFormBase.php');
    $oppForm = new OpportunityFormBase();
    return $oppForm->getForm('');
    }

    ?>

    Attached is my EditView.html file.
    Btw, in the DB in fields_meta_data are defined the custom fields. Where are the other fields defined? Thanks for the help!!

    Alan
    Attached Files Attached Files

  2. #2
    aschaeffer is offline Sugar Community Member
    Join Date
    Oct 2006
    Location
    Vienna, Austria
    Posts
    35

    Default Re: Required field verify not working in opportunities

    Problem solved!
    I just somehow erased the return check_form('EditView') from
    <input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save';return check_form('EditView');" type="submit" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " />

    Alan

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
  •