Results 1 to 2 of 2

Thread: Adding Teams value to WebtoLead Capture form

  1. #1
    ssmeredith is offline Sugar Community Member
    Join Date
    Mar 2007
    Posts
    17

    Default Adding Teams value to WebtoLead Capture form

    I've got the leadcapture form working fine from our website. We have assigned the user but need to have the Teams ex: Team A added as a hidden value.

    When I set up the form using the form creator ( through campaigns) there is no option to drag that field to the form. I am thinking I need to create some type of relationship but I already have this in the leads module and working fine. Just not showing as an option to include in the form.

    So then I am looking for the fields specifically under the dropdown builder and there are no Teams anything listed there so therefore can't find the fileds to add as a hidden field, not even sure it would work if not really linked so I am asking for assistance. I know it's got to be easy - it's those simple things right under your nose that always get me stumped.


    We're using:

    Teams Module: 0.97
    Version: Sugar 5.1.0c CE
    OS: LAMP


    Thank You.
    Last edited by ssmeredith; 2009-04-07 at 03:29 AM.

  2. #2
    mvngti is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    South Africa
    Posts
    510

    Default Re: Adding Teams value to WebtoLead Capture form

    There is another way.

    Create a before_save logic hook on Leads that check if the team_id is empty and set it to your "team A" id.
    That way any lead that is saved from the WebtoLead form will have that team id.

    With some extra logic you could even set it to different ones.
    if you do not know how to create the logic hook use the editLogicHooks tool in my signature to create the hook and put something like this into it.

    PHP Code:
    if (empty($bean->team_id))
        
    $bean->team_id id_of_your_default_team
    or to set the assigned user's default_team.
    PHP Code:
    if (empty($bean->team_id))
    {
       require_once 
    "modules/Users/User.php";
       
    $user = new User;
       
    $user->retrieve($bean->assigned_user_id))
       
    $bean->team_id $user->default_team;

    M
    --


    Marnus van Niekerk

    There are only 10 types of people in the world
    those who can read binary and those who don't

    Modules:
    CE Teams - Upgrade safe teams module for Community Edition
    FieldACL - Field Level Access Control for Community Edition
    EditLogicHooks - Create and edit Logic Hooks from the Admin GUI
    FlexibleChartDashlet - Display any data in a Dashlet Chart
    DocumentThumbnails - Thumbnails for Documents module

    Many questions can be answered by reading the Developers Manual

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. webtolead form - different user assignment
    By sugarcrm.new in forum Help
    Replies: 1
    Last Post: 2008-12-16, 12:00 AM
  2. Replies: 5
    Last Post: 2008-07-17, 07:05 PM
  3. WebtoLead Form - create a Contact not Lead
    By southwestcrm in forum Help
    Replies: 1
    Last Post: 2008-05-30, 07:36 PM
  4. Replies: 0
    Last Post: 2008-03-25, 12:19 AM
  5. Replies: 2
    Last Post: 2007-04-17, 02:46 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
  •