function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gliderglider 

Modifying salesforce wordpress plugin

I am a newborn in salesforce. We installed a plugin from salesforce for Wordpress called Wordpress-to-lead-Salesforce plugin. I have contacted the developer and he can't answer my question, (too busy/doesn't know). I am sending field data to the leads part of salesforce. name, etc. I created a custom field called project_type. But cannot get the data to show up in the lead generated from the plugin (the name,etc shows up- which was default in the plugin). I know the data is being added to the variable string being sent to salesforce (I think :), cause I also email myself the data. (the field is a drop down menu (select) )

 

Has anyone worked with the wordpress plugin yet? Can direct me to where (docs, etc) that could help me?

 

Thanks so much,

robin

gliderglider

the plugin is using

 

https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8

 

I've been looking in the documentation for servlet help, can someone direct me?

cian1991ferrarician1991ferrari

Glider, I have done this and added a select field to the Salesforce plugin. Took me 2 days to find it but i'll try explain it.

 

 

You need to go to plugins tab in WordPress admin and then click editor. Go to the Salesforce wordpress-to-lead plugin and edit the main php file. There are many things you need to do.

- You must first add the select field as a selectable field in the php. You add this in the same spot where there is already the text and textarea options.

- You then need to add the behaviour on the front end when you have a select box. This means you can only have 1 text box but maybe this will be changed later. For it to work, you need to say if the type is a select box type, use the following code. And the code should be the select field and all possible options in HTML format. You can get it by generating a web to lead form in SalesForce. You must have the name and id fully correct.

- Then you must add the field into the list of the default fields.

- The last but most important thing you must do is add the field to your salesforce record in the database. To do this you must find the salesforce record (I think it is in the wp-options table) and then copy and paste an existing entry and modify it to be the relevant to your new field.

 

Another note is that for it to work correctly, you must name the field the same as the ID SalesForce gave when you created the custom field.

 

I hope this makes some sort of sense.

 

Cian

ER SharesER Shares

Cian, 

 

Do you have examples of the code you're talking about that you could share here? I'm not a developer so while I theoretically understand your instructions, I can't actually code what you're describing. Also, could you perhaps include screenshots of what you mean here; "The last but most important thing you must do is add the field to your salesforce record in the database."

 

Thanks,

ERShares

Stony Grunow - BreadwinnerStony Grunow - Breadwinner

Hi Robin

 

What can be a bit tricky about the Salesforce web to lead is that standard fields have English names, like Company or Website, while custom fields use the Salesforce ID, so they will look like 00N000000abC123.

 

So when you're in the Wordpress to Lead plugin, make sure you are using the correct ID for your custom field. You can find this out many ways, but one easy way is to go to the custom field in setup, and look at the URL - it will have a field ID at the end.

 

I've written up a few more tips for the plugin at my blog, including how to edit the PHP so the plugin doesn't show "Powered by Salesforce" at the bottom of every plugin.

 

http://daddyanalytics.com/wordpress-to-lead-for-salesforce-crm/