Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Close Text Fields

  1. #1
    cagatay is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    Turkiye
    Posts
    72

    Default Close Text Fields

    I is very hard to make this in Sugar 5.0

    I wanna make 2 too close text field

    Has anybody tried to do this?



    Note: This picture was created by Photoshop

  2. #2
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Close Text Fields

    You can edit this by hand in EditView.tpl files.

    e.g. I have changed the Zip-City representation with following code:

    Code:
    <tr>
    <td width='%' class="dataLabel" NOWRAP>
    {sugar_translate label='LBL_CITY' module=''}:
    </td>
    <td width='%' class='tabEditViewDF' >
    <input type="text" name="primary_address_postalcode" id="primary_address_postalcode" size="6" maxlength='150' value='{$fields.primary_address_postalcode.value}' tabindex="4">
    <input type="text" name="primary_address_city" id="primary_address_city" size="20" maxlength='150' value='{$fields.primary_address_city.value}' tabindex="4">
    </td>
    </tr>
    <tr>
    Attached Images Attached Images  

  3. #3
    cagatay is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    Turkiye
    Posts
    72

    Default Re: Close Text Fields

    Dear Kuske

    here is my editview with phone string
    Code:
        'panels' => array(
    	   'lbl_account_information'=>array(
    		        array('name', array('name'=>'phone')),
    		        array('website', 'fax'),
    		        array('ticker_symbol', 'phone_alternate'),
    		        array('rating', 'employees'),
    		        array('ownership','industry'),
    
    		        array($_object_name . '_type', 'annual_revenue'),
    I dont know how can I adapt this one like yours?

    Regards

  4. #4
    madmat is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    164

    Default Re: Close Text Fields

    Quote Originally Posted by cagatay
    Dear Kuske

    here is my editview with phone string
    Code:
        'panels' => array(
    	   'lbl_account_information'=>array(
    		        array('name', array('name'=>'phone')),
    		        array('website', 'fax'),
    		        array('ticker_symbol', 'phone_alternate'),
    		        array('rating', 'employees'),
    		        array('ownership','industry'),
    
    		        array($_object_name . '_type', 'annual_revenue'),
    I dont know how can I adapt this one like yours?

    Regards
    This is the editview.php

    Kuske refered to the EditView.tpl

  5. #5
    cagatay is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    Turkiye
    Posts
    72

    Default Re: Close Text Fields

    Which EditView.tpl do you refer?

    There is no EditView.tpl file in my custom module?

    Regards

  6. #6
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Close Text Fields

    OK let's start from scratch.

    Sugar has a default template in each module directory for each view, e.g for accounts this is the file
    \modules\Accounts\metadata\editviewdefs.php for the editview.

    If you change the code in this default template in a clean installation then you will see the changes on the accounts editview.

    Code:
        'panels' => array(
    	   'lbl_account_information'=>array(
    		        array(
                     array('name'=>'name', 
                           'displayParams'=>array('required'=>true)
                           ), 
                     array('name'=>'phone_office',
                           'customCode' => 
    '<input name="ticker_symbol" size="6" maxlength="6" type="text" value="{$fields.ticker_symbolvalue}">&nbsp;<input name="phone_office" size="20" maxlength="20" type="text" value="{$fields.phone_office.value}">',
                          )
                     
                       ),
    The first time you open an editview for an account the file
    /cache/modules/Accounts/EditView.tpl will be generated (the file where I changed in my first post).

    Every time you change the \modules\Accounts\metadata\editviewdefs.php you MUST delete this cache-file.

    NOW, if you use the STUDIO to design your EditView, the STUDIO reads the default template \modules\Accounts\metadata\editviewdefs.php and generates a custom template in /custom/modules/Accounts/metadata/editviewdes.php.

    Additionally it creates a copy in /custom/working/modules/Accounts/metadata/editviewdef.php.

    In these file your changes look like:

    Code:
          'panels' => 
          array (
            'Account Information' => 
            array (
              0 => 
              array (
                0 => 
                array (
                  'name' => 'name',
                  'displayParams' => 
                  array (
                    'required' => true,
                  ),
                  'label' => 'LBL_NAME',
                ),
                1 => 
                array (
                  'name' => 'phone_office',
                  'customCode' => '<input name="ticker_symbol" size="6" maxlength="6" type="text" value="{$fields.ticker_symbolvalue}">&nbsp;<input name="first_name" size="20" maxlength="20" type="text" value="{$fields.first_name.value}">',
                  'label' => 'LBL_PHONE_OFFICE',
                ),
              ),
    If you changed your editview already in STUDIO you should delete these two files before changing the default template.
    They will be generated correctly again on calling the STUDIO - or - you enter your changes directly in these two files without changing the standard template (the method I prefer in my environment).

    Always make backup copies of your changes!

    Have fun with Sugar
    Harald Kuske
    Attached Images Attached Images  
    Last edited by kuske; 2008-04-03 at 01:23 PM.

  7. #7
    cagatay is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    Turkiye
    Posts
    72

    Default Re: Close Text Fields

    Mr Harald Kuske

    Thanks a lot for your long and detailed REPLY

    As I mentioned here I am NEW in SUGAR

    Now I did all what you said but what is interesting is that NO CHANGE can be seen in "edit view" page

    Lets explain like that:

    I have a new custom module:

    root\modules\GF\

    there is a editviews.php file in root\modules\GF\metadata\

    There is also another editviews.php file in /custom/modules/GF/metadata/editviewdes.php.

    These two files here atteched my post (without any changes)

    Please could it be possible for you to make changes in these files and i will UPLOAD it again

    I wonder are there any actions after editing php files ? (forget deleting CACHE fodler)

    I did nothing except for deleting cache file

    Best Regards
    Attached Files Attached Files

  8. #8
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Close Text Fields

    attached you can find the editviewsdef.php for root\modules\GF\metadata\ that should work,
    if not I really have no idea why not.

    You should delete the other in custom... and clear the cache, then open an GF object to edit.

    regards
    harald kuske
    Attached Files Attached Files

  9. #9
    madmat is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    164

    Default Re: Close Text Fields

    Quote Originally Posted by cagatay
    (forget deleting CACHE fodler)
    I did nothing except for deleting cache file
    Best Regards
    Do not empty the cache folder manually,
    Goto Admin-Repair-Quick Repair and Rebuild
    Select your module (Accounts) and leave the check boxes.

    After that it should work, I´ve just tried it myself.

  10. #10
    cagatay is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    Turkiye
    Posts
    72

    Default Re: Close Text Fields

    Mr Herald KUSKE

    The Great Man...honorable...

    I really thankful, grateful for your help cause I was pulling my hair out since more than 4 days

    This is grat job and worked clearly

    I can see ZIP CODE AREA in my edit view OKEY ?

    But when I enter some data to ZIP AREA and PHONE area

    It could not be displayed in DETAIL VIEW ? No store of these fields data? Just see field..

    Any idea?

    Best Regards

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mass Update for Text Fields or an Alternative
    By jennifleac in forum Help
    Replies: 0
    Last Post: 2007-12-17, 10:15 PM
  2. Replies: 1
    Last Post: 2007-03-20, 01:28 PM
  3. Replies: 2
    Last Post: 2007-01-18, 05:44 PM
  4. Trying To Create Custom Text Fields - BUG?
    By JustinK101 in forum Help
    Replies: 1
    Last Post: 2006-09-14, 05:35 PM
  5. Import text fields to date and checkboxes
    By lpahdoco in forum Help
    Replies: 0
    Last Post: 2006-06-14, 04:05 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
  •