WordPress-to-lead for Salesforce CRM
[resolved] %URL% character limit on Lead Source Field!? (3 posts)

  1. Adam Blythe
    Posted 3 years ago #

    Only the first 40 characters of my Lead Source %URL% is being captured. Not ideal when my URLs are longer than 40 characters.

    Is there a way to increase the character limit for the Lead source field?



  2. Nick Ciske
    Plugin Author

    Posted 3 years ago #

    That's set on the SalesForce side, it has nothing to do with the plugin (it just posts the data, SalesForce truncates it).

    Apparently not...

    You could use a custom field, but I can't remember if the %URL% macro works there or not...

  3. FGarcia@technologycustoms.com
    Posted 2 years ago #

    Nick, adsleeblythe,

    Not sure if you guys ever got an answer, but I did a quick method for us to work.

    First, the %URL% variable will NOT work in any custom field.

    Second, In Salesforce.com, add a field for your URL to be stored (set to 255 text length.)

    You'll notice a 15 digit code assigned to the field. (When you export the HTML from SalesForce, it is the "id" of that field).

    In the SF plugin, on your form, create a field. The field name should be the 15 character code from above. Enable the field, and make it required, and HIDDEN. Name it something, and put something into the default value field (anything is fine, this will be completely replaced.)

    Move on to the Plugins > Editor > and edit the main (salesforce-wordpress-to-lead/salesforce.php) file.

    Search for the following string:
    $post['lead_source'] = str_replace('%URL%','['.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'].']',$options['forms'][$form_id]['source']);

    Right below that, add the following snippit:
    $post['00N40000006Wg4i'] = '['.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'].']';

    Notice that my code is "00N40000006Wg4i", MAKE SURE YOU REPLACE THIS WITH YOUR OWN!

    Save the file and that should do it!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress-to-lead for Salesforce CRM
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic