WordPress.org

Ready to get started?Download WordPress

Forums

WordPress-to-lead for Salesforce CRM
[resolved] Github fork with some added features (75 posts)

  1. jbuchbinder
    Member
    Posted 1 year ago #

    I forked a copy of the plugin here:

    https://github.com/jbuchbinder/salesforce-wordpress-to-lead

    and added some features, including (but not limited to):

    • "Select" widget support
    • WPFC7 style integration support
    • "Clone" form support
    • Placeholder attributes for text/textarea widgets

    http://wordpress.org/extend/plugins/salesforce-wordpress-to-lead/

  2. redone975
    Member
    Posted 1 year ago #

    Any chance you can add a simple checkbox to this copy of the plugin?

    There are a lot of instances where this would come in handy:

    • Sign me up for newsletters
    • Request a representative to contact me
    • etc
  3. jbuchbinder
    Member
    Posted 1 year ago #

  4. redone975
    Member
    Posted 1 year ago #

    Wow, thanks for the quick fix...

    However, the new "checkbox" option doesn't appear under the "Add a field" Type... Only in the original 13 pre-defined fields (first_name, last_name, email, phone, etc).

  5. redone975
    Member
    Posted 1 year ago #

    Do you just need to add it to line 446?

    row += '<td><select name="add_inputs['+i+'][type]"><option>text</option><option>textarea</option><option>hidden</option><option>select</option><option>checkbox</option></select></td>';

  6. redone975
    Member
    Posted 1 year ago #

    Added the checkbox to line 446 and tested it out... It works!

    Thank you for your help, I really appreciate it.

  7. redone975
    Member
    Posted 1 year ago #

    Update - Instead of adding the code on lines 737 and 738, I revised the following code on line 695, so that the checkbox would appear to the left of the label text.

    if($input['type'] != 'hidden') {
    	if ($options['wpcf7css']) { $content .= '<p>'; }
    	if ($input['type'] == 'checkbox') {
    		$content .= "\t\n\t".'<input type="checkbox" id="sf_'.$id.'" class="w2linput checkbox" name="'.$id.'" value="'.$val.'" />'."\n\n";
    	}
    	$content .= "\t".'<label class="w2llabel'.$error.$input['type'].'" for="sf_'.$id.'">'.esc_html(stripslashes($input['label']));
    	if ($input['type'] != 'checkbox') {
    		$content .= ':';
    	}
    }
  8. jbuchbinder
    Member
    Posted 1 year ago #

    I adjusted the code on github. Let me know if you have any additional issues.

  9. sundaymorningclub
    Member
    Posted 1 year ago #

    Do you have a code for a drop menu on this plugin?

  10. jbuchbinder
    Member
    Posted 1 year ago #

    If you mean an HTML select control, then yes.

  11. frank.scott
    Member
    Posted 1 year ago #

    Are the changes you recently completed in the plugin available on wordpress. I need the check box functionality. I am new to wordpress as well as all the worjk being done in the plugins.

  12. sundaymorningclub
    Member
    Posted 1 year ago #

  13. jbuchbinder
    Member
    Posted 1 year ago #

    Use "select" as the widget type, and set "opts" to be a pipe delimited list of options.

    For example, to get "A", "B", and "C", you'd use "A|B|C" in the opts field.

    There's a more complicated syntax if you want the values and labels to be different.

  14. sundaymorningclub
    Member
    Posted 1 year ago #

    Thanks. where do i do this, is it in the code as I am not a developer?

  15. jbuchbinder
    Member
    Posted 1 year ago #

    In the form, in the same way you would declare a text widget, textarea widget, etc. There's an extra option for "select".

  16. sundaymorningclub
    Member
    Posted 1 year ago #

    I must not have downloaded the update correctly. Can you advise on the link for the updates and what to do. Im really grateful for your help

  17. jbuchbinder
    Member
    Posted 1 year ago #

    The only important file to replace (right now, anyways) is the salesforce.php file. You can grab a copy from:

    https://raw.github.com/jbuchbinder/salesforce-wordpress-to-lead/master/salesforce.php

    which will be the latest version of the code. Replace the salesforce.php file, which should be:

    wp-content/plugins/salesforce-wordpress-to-lead/salesforce.php

    with this.

  18. sundaymorningclub
    Member
    Posted 1 year ago #

    see http://www.sundaymorningclub.com/register-for-your-papers-to-be-delivered/
    This is not working, please advise. Nearly there

  19. sundaymorningclub
    Member
    Posted 1 year ago #

    Got it working, but please look it is away to the right on the firm
    see http://www.sundaymorningclub.com/register-for-your-papers-to-be-delivered/

  20. jbuchbinder
    Member
    Posted 1 year ago #

    I generally don't use w2l styling, which is why it's missing the "clear: both;" for the new widget.

    Grab another copy, it should be good as of rev:

    https://raw.github.com/jbuchbinder/salesforce-wordpress-to-lead/c3f6d40e964db011664ed4081ce3e875311fc421/salesforce.php

  21. sundaymorningclub
    Member
    Posted 1 year ago #

    Link does not work.Please advise further

  22. frank.scott
    Member
    Posted 1 year ago #

    Having the check boxes is great. I am having a problem with the check boxes passing values to salesforce. Also when the field is set as reqired and it is populated getting the error message that it needs to be populated.

  23. jbuchbinder
    Member
    Posted 1 year ago #

    I'm not sure what you mean. I'm able to access the code from that URL. You can re-download from the "master" URL above.

  24. frank.scott
    Member
    Posted 1 year ago #

    When I hit the submit button, no values for the check boxes pass to salesforce. All of the other values populate. I have one check box that I would like to set as required. When I set it as required I get an error telling me to complete the form, when I already have.

  25. frank.scott
    Member
    Posted 1 year ago #

    OK, i have downloaded the master url adn still have the same problem. I thought maybe adding options of "True|False" or "1|2" would get it to populate the check box in salesforce, but no luck. Please help.

  26. jbuchbinder
    Member
    Posted 1 year ago #

    That's not how the INPUT "checkbox" widget works in HTML.

    $content .= "\t\n\t".'<input type="checkbox" id="sf_'.$id.'" class="w2linput checkbox" name="'.$id.'" value="'.$val.'" />'."\n\n";

    is the code generating the checkbox. If it's checked, it will pass the "value" column value for that variable. If not, it passes nothing.

    If you mark it as "required", it won't allow the form to be submitted unless that box is checked, since otherwise no value would be passed for the checkbox widget. That's how checkboxes work.

  27. frank.scott
    Member
    Posted 1 year ago #

    I truly appreciate your patience. I have to be doing something wrong. I dont have any values or options populated. I am using the group edition of salesforce. I am trying to utilize it with Custom and Standard fields. What else can i provide that would help trouble shoot what I am seeing?

  28. Nick Ciske
    Member
    Plugin Author

    Posted 1 year ago #

    Verify you have the field named correctly. That's usually the reason data doesn't get to SF.

    More Info:
    http://wordpress.org/support/topic/not-all-fields-are-transferring-to-salesforce?replies=2

  29. frank.scott
    Member
    Posted 1 year ago #

    That was the first think I checked. Had that issue in another salesforce instance integrated with SAP.

  30. frank.scott
    Member
    Posted 1 year ago #

    I figure out my issue. The value had to be populate with a "1" for the true statement.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic