Results 1 to 4 of 4

Thread: How to validate QuickCreate form in subpanel

  1. #1
    karlee is offline Member
    Join Date
    May 2009
    Location
    India
    Posts
    7

    Default How to validate QuickCreate form in subpanel

    hai every one..

    How to validate quick create form in sub-panel while i click "save" button in the form..

    also how to overrides the "save" button functionality in quickcreatedefs.php in (custom/modules/<module_name>/metadata/)

    please help me ...

  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 to validate QuickCreate form in subpanel

    HI karlee

    You can just add the buttons element into quickcreate defs to override the Save button.
    Have a look on modules/Leads/metadata/detailviewdefs.php as an example.

    Cheer
    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
    karlee is offline Member
    Join Date
    May 2009
    Location
    India
    Posts
    7

    Default Re: How to validate QuickCreate form in subpanel

    Thanks andopes..

    Related modules is the sub-panel of Quotes module. Already they have relationship between Quotes and Related module. When i clicks "create" button in Related sub-panel, then opens Related Quickcreate form on the same sub-panel. When i clicks "save" button in the form. i need to validate the text field..

  4. #4
    redpillsweden is offline Sugar Community Member
    Join Date
    Nov 2006
    Posts
    32

    Default Re: How to validate QuickCreate form in subpanel

    Quote Originally Posted by andopes View Post
    HI karlee

    You can just add the buttons element into quickcreate defs to override the Save button.
    Have a look on modules/Leads/metadata/detailviewdefs.php as an example.

    Cheer
    Hello

    I want to do the same thing but I can't get it to work. I've overriden the Save button with some custom code in my editviewdefs.php but it's almost like it skips the form->buttons section for the QuickCreateForm? The buttons I add or remove here has no impact what so ever. But the fields and stuff I modify in quickcreatedefs.php changes the layout of the form.

    Is there any known problem with this?

    Works (editviewdefs.php):
    PHP Code:
    $viewdefs ['Opportunities'] = 
    array (
      
    'EditView' => 
      array (
        
    'templateMeta' => 
        array (
            
    'form' => 
              array (
                
    'buttons' => 
                array (
                  
    => array(
                      
    'customCode' => 
                        
    '<input id="save_opportunity" type="submit" value="'.$GLOBALS['app_strings']['LBL_SAVE_BUTTON_LABEL'].'" name="button" onclick="this.form.action.value=\'Save\'; return (check_account(\''.$GLOBALS['mod_strings']['LBL_ACCOUNT_ERROR'].'\') && check_form(\'EditView\'));"  class="button" accesskey="S" title="Save [Alt+S]"/>&nbsp;'
                    
    ),
                  
    => 'CANCEL',
                ),
                ), 
    Don't work (quickcreatedefs.php):
    PHP Code:
    $viewdefs = array (
      
    'Opportunities' => 
      array (
        
    'QuickCreate' => 
        array (
          
    'templateMeta' => 
          array (
            
    'form' => array (
                  
    'buttons' => array (
                      
    => array(
                          
    'customCode' => 
                            
    '<input id="save_opportunity" type="submit" value="'.$GLOBALS['app_strings']['LBL_SAVE_BUTTON_LABEL'].'" name="button" onclick="this.form.action.value=\'Save\'; return (check_account(\''.$GLOBALS['mod_strings']['LBL_ACCOUNT_ERROR'].'\') && check_form(\'QuickCreate\'));"  class="button" accesskey="S" title="Save [Alt+S]"/>&nbsp;'
                        
    ),
                    
    => 'CANCEL',
                      ),
              ), 

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2009-03-13, 11:32 AM
  2. Web to Lead Form does not validate
    By kenlyle in forum Help
    Replies: 7
    Last Post: 2008-07-17, 09:11 PM
  3. Replies: 9
    Last Post: 2007-07-02, 02:00 PM
  4. Replies: 2
    Last Post: 2007-06-01, 02:57 PM
  5. How to build a QuickCreate form?
    By johnfd in forum Help
    Replies: 1
    Last Post: 2007-03-28, 06:44 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
  •