Results 1 to 2 of 2

Thread: If nothing is entered into field, generated url should be blank

  1. #1
    bubbasheeko is offline Junior Member
    Join Date
    Jan 2011
    Posts
    4

    Default If nothing is entered into field, generated url should be blank

    Is there a way to have a generated URL field save nothing to the database if the field that is used to build it is empty?

    I noticed when browsing the database that the complete URL is being stored. Is there a way to check to see if the field is empty and if it is, do not generate the URL?

    Using Sugar 6.1.4 CE.

    Hopefully somebody can give me a pointer here

  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: If nothing is entered into field, generated url should be blank

    You can create the script custom/include/SugarFields/Fields/URL/EditView.tpl and replace the line


    {if $displayView=='advanced_search'||$displayView=='ba sic_search'}value=''{else}value='http://'{/if} title='{{$vardef.help}}' tabindex='{{$tabindex}}'>

    by


    {if $displayView=='advanced_search'||$displayView=='ba sic_search'}value=''{else}value=''{/if} title='{{$vardef.help}}' tabindex='{{$tabindex}}'>


    Regards
    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. Replies: 5
    Last Post: 2010-05-06, 11:22 AM
  2. Auto-Generated Field
    By mvelic in forum Help
    Replies: 1
    Last Post: 2010-02-08, 04:53 AM
  3. Replies: 0
    Last Post: 2009-06-30, 08:12 AM
  4. adding a system generated field
    By shamimwilson in forum Help
    Replies: 3
    Last Post: 2009-05-09, 08:12 AM
  5. Replies: 14
    Last Post: 2006-11-14, 06:56 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
  •