Support » Plugin: Brilliant Web-to-Lead for Salesforce » %URL% character limit on Lead Source Field!?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nick Ciske


    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…


    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, 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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘%URL% character limit on Lead Source Field!?’ is closed to new replies.