WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms Salesforce Add-on
[resolved] Checkboxes or multi-selects not working (13 posts)

  1. gmcinnes
    Member
    Posted 1 year ago #

    There seems to be an impedence mismatch between how gravity forms populates checkboxes or multi selects and how salesforce expects them.

    The problem is that, for checkboxes, for instance, gravity forms wants to put them in an aggregate container. Each of these containers can only point to one element on the feed list, when in fact, each *checkbox* should point to one element on the feed list.

    I tried to work around this by converting the series of checkboxes we use to be a multi-select instead. But when submitting a multi-select, salesforce picks up the submitted value like "foo,bar,baz" as an item in the picklist, instead of adding those three elements separately.

    What's the best way to handle selecting multiple items from a list? Am I just missing something here? Or is it not currently supported?

    http://wordpress.org/extend/plugins/gravity-forms-salesforce/

  2. gmcinnes
    Member
    Posted 1 year ago #

    Ok. I have a patch to make multiselects work:

    1285a1286
    >
    1287d1287
    < 	 	$input_type = RGFormsModel::get_input_type($field);
    1295,1302c1295,1299
    < 			if($input_type == 'multiselect') {
    < 				$elements = explode(",",$entry[$field_id]);
    < 				$new_elements = array_map('htmlspecialchars', $elements);
    < 				$newest_elements = implode(';',$new_elements);
    < 				$merge_vars[$var_tag] = $newest_elements;
    < 			}
    < 			else
    < 			{
    ---
    >             		/*
    > if($field['type'] == 'textarea') {
    >             			$merge_vars[$var_tag] = '<![CDATA['.$entry[$field_id].']]>';
    >             		} else{
    > */
    1304c1301
    < 			}
    ---
    >             		#}
  3. Zack Katz
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks, @gmcinnes for your help. Would you be interested in becoming a committer on the plugin?

  4. gmcinnes
    Member
    Posted 1 year ago #

    Sure. There's lots still to do I think. Some types of dates don't work. Checkboxes don't work, and I"m not sure how to fix that.

  5. Zack Katz
    Member
    Plugin Author

    Posted 1 year ago #

    Can you send me your email to support@katz.co ?

  6. gmcinnes
    Member
    Posted 1 year ago #

    HI Zack: I think I sent my email, didn't I?

  7. armando_e
    Member
    Posted 1 year ago #

    Hi. How can I implement this code into the plug in? What do those numbers mean? (ex 1285a1286).

    I will have some check boxes with multiple values that I need to send as different data items.

    Great plug in, thanks for the work.

  8. gmcinnes
    Member
    Posted 1 year ago #

    Armando: What I included up there is a diff that helped Zack fix the problem (I hope).

    But he's added much more than my diff did. This issue is already solved. You should upgrade the plugin to the latest.

  9. armando_e
    Member
    Posted 1 year ago #

    Thanks for responding. I installed the latest version of the plug in.

    "Armando: What I included up there is a diff that helped Zack fix the problem (I hope)."
    Understood.

    "But he's added much more than my diff did. This issue is already solved. You should upgrade the plugin to the latest."
    Understood.

    I still cannot get check boxes to load into Salesforce. I am using Web to Lead. Will I need to upgrade to a API package to get that to work?

    Here is what I have:
    In GF, I have a check box area with 4 different options. The user can select 1 or all 4. In SF, I create a custom field, select Checkbox as the type. When submitted, I do not get anything in the check box.

    I would like each of the checked Items as a separate record set in SF.

    Thanks again for the amazing work.

  10. armando_e
    Member
    Posted 1 year ago #

    If anyone can help me figure this out let me know your rate. Really need this feature.

    Thanks!

  11. gmcinnes
    Member
    Posted 1 year ago #

    Sorry armando. I really don't know. I don't use the web-to-lead style interface. Using the SOAP API everything "just works" now. At least as far as checkboxes go :) Sorry I couldn't be more help.

  12. armando_e
    Member
    Posted 1 year ago #

    Thank you so much for replying. This information really helps quite a lot. I will try to see if we can update our package to an API version and not use the web to lead one. Again, thank you so much for replying.

  13. gmcinnes
    Member
    Posted 1 year ago #

    Ok. If you do that beware that there are other bugs lurking in the current 2.1.1 SOAP API version. See my other patches in this forum. Or bug Zack to apply them :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.