Results 1 to 3 of 3

Thread: Custom Lead Capture form. What goes in leadCapture_override.php?

  1. #1
    Yachuk is offline Junior Member
    Join Date
    Jan 2009
    Posts
    2

    Default Custom Lead Capture form. What goes in leadCapture_override.php?

    I'm trying to hook up a custom Lead Capture form, following the steps outlined in <http://www.sugarcrm.com/wiki/index.php?title=Creating_a_lead_capture_form_for_y our_website>. Using SugarCRM 5.2 I think.

    I get that I have to create a leadCapture_override.php file, but I don't really understand what is supposed to go in there. The example suggests the following text:


    <?
    $users = array(
    'my_lead_capture_form' => array( 'name' => 'USERNAME GOES HERE',
    'pass' => 'PASSWORD HASH GOES HERE' ));
    ?>

    but where do I get a username and password hash from? Can I access the database from inside the PHP script? Which username should I be using?

    And what should I be doing with the rest of the fields from the custom form?

    The example then goes on to discuss code inside the leadCapture.php file, but the one I found only seems to redirect to index.php. I'm at a bit of a loss here. Any help would be greatly appreciated.

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Custom Lead Capture form. What goes in leadCapture_override.php?

    If you have a user that you want all leads to go to put their username and user hash ( the user hash can be found in the database...use phpMyAdmin or some other tool to query it) into those areas. To find the user hash run this query against your database:

    select user_hash from users where user_name = 'desireduserhere'

  3. #3
    Yachuk is offline Junior Member
    Join Date
    Jan 2009
    Posts
    2

    Default Re: Custom Lead Capture form. What goes in leadCapture_override.php?

    Quote Originally Posted by eggsurplus View Post
    If you have a user that you want all leads to go to put their username and user hash ( the user hash can be found in the database...use phpMyAdmin or some other tool to query it) into those areas. To find the user hash run this query against your database:

    select user_hash from users where user_name = 'desireduserhere'
    Thanks for the response.

    Are you saying that I should hardcode a user_name and password_hash in the PHP file? Is that standard practice? Or is there some way to run the SQL in-line?

    How does leadCapture.php take care of inserting data from the form into the DB? Are there particular field names that I need to use, so it knows what to insert into the DB? In other words, is there anything else do I need to do in either the HTML or in leadCapture_override.php to get data from the HTML form into the DB?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Error in lead capture form
    By sawan in forum Developer Help
    Replies: 4
    Last Post: 2009-05-24, 06:10 AM
  2. HOWTO: Edit a Campaign Lead Capture Form?
    By baigeman in forum Help
    Replies: 3
    Last Post: 2007-12-11, 04:46 AM
  3. Replies: 5
    Last Post: 2007-06-22, 03:57 AM
  4. Lead Capture form send to Accounts or Contacts
    By creativeone in forum Help
    Replies: 1
    Last Post: 2007-04-25, 11:18 PM
  5. Guide for website lead Capture form
    By vkr2005 in forum Help
    Replies: 3
    Last Post: 2006-12-01, 09:00 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
  •