Results 1 to 6 of 6

Thread: how can i apply validation on dropdown list?

  1. #1
    tahir.nazir is offline Member
    Join Date
    Apr 2009
    Posts
    12

    Question how can i apply validation on dropdown list?

    i add a new field in opportunity tab
    field name is van with the drop down menu van1,van2,van3
    and set choose vehicle as default
    there are another field time and date
    my task is that
    "when i choose a time and then select a van if that van is already booked then i will display message"

  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: how can i apply validation on dropdown list?

    Hi Tahir

    You need to add a javascript in the editviewdefs.php. Take a look in the modules/Accounts/metadata/editviewdefs.php to understand how to do.
    Then you need to add a new attribute in the dropdown field defs:
    PHP Code:
    'displayParams' => array(
      
    'javascript' => 'onchange="someFunction();"',
    ), 
    Then you need to define this someFunction in the javascript.

    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.

  3. #3
    tahir.nazir is offline Member
    Join Date
    Apr 2009
    Posts
    12

    Default Re: how can i apply validation on dropdown list?

    thanks andopes
    i am working on old version of sugar. version is 4.5
    there is no editviewdefs.php in modules/Accounts/metadata
    now how can i do?? can u help me??

  4. #4
    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: how can i apply validation on dropdown list?

    So you need to deal with the EditView.html and EditView.php
    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.

  5. #5
    tahir.nazir is offline Member
    Join Date
    Apr 2009
    Posts
    12

    Default Re: how can i apply validation on dropdown list?

    again thanks
    can i use ajax for this problem? i yes than please also guide how will do?

  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: how can i apply validation on dropdown list?

    Have a look on this thread

    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. how can i apply validation on dropdown list?
    By tahir.nazir in forum Help
    Replies: 2
    Last Post: 2009-04-07, 09:27 AM
  2. Dropdown validation on blank value
    By thancock in forum Help
    Replies: 3
    Last Post: 2008-09-08, 11:53 AM
  3. Replies: 1
    Last Post: 2008-04-07, 11:21 AM
  4. Replies: 0
    Last Post: 2008-04-07, 06:52 AM
  5. Replies: 3
    Last Post: 2006-06-30, 08: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
  •