WordPress.org

Ready to get started?Download WordPress

Forums

Contact-Form-7: 3rd-Party Integration
[resolved] mapping checkbox (7 posts)

  1. ray.owens@orange.fr
    Member
    Posted 2 years ago #

    What please is the proper format for inserting a CF-7 checkbox field into mapping sections of the 3-rd Party Integration.

    Putting the tag name alone - checkbox-301 - does not transmit the user-selected values to the mapped field.

    The tag in the CF7 form is:
    [checkbox* checkbox-301 use_label_element "mobile" "media intel"]

    Form works fine, but the user-selected value is not posted.
    Attempting to post to a text field in SugarCRM.

    Will appreciate suggestion for the correct format to insert tag into mapping section, 3rd-Party Integration.

    http://wordpress.org/extend/plugins/contact-form-7-3rd-party-integration/

  2. s.edel
    Member
    Posted 2 years ago #

    Do you found a solution ?
    I have the same issue.

    I posted a new question to this forum.
    For me Hooks and add_filter must be used.
    I think CF7 array (like checkbox) must be convert with php to simple string before inserting in SUGAR.

    My problem is that I don't know how to use add_filter and where I must add my php function.

    Regards,
    Sébastien

  3. ray.owens@orange.fr
    Member
    Posted 2 years ago #

    Hello Sébastien,

    Just this morning I found the solution, at least for what I need to do:

    The proper format for inserting into the 3rd-party mapping form is indeed the short name of the checkbox element, such as checkbox-301

    Like you discovered, the array was not being accepted by SugarCRM. In order to send just a simple string instead of an array, I changed the checkbox element in CF7 to "exclusive", that is, only a single choice is permitted.

    In the CF7 definition of the checkbox named "checkbox-301", it is, for example:
    [checkbox* checkbox-301 exclusive "Schedule a meeting" "Schedule a live demo" "Set up test account" "Discuss partner opportunities"]

    In the 3rd-party mapping, it is only identified by: checkbox-301

    Now it sends only the simple string, the single answer, and posts correctly to SugarCRM.

    I hope this helps. Regards. Ray

  4. s.edel
    Member
    Posted 2 years ago #

    Ray, thanks for your reply,

    No it doesn't help.
    I realy need to have multiple checkbox responses. (so an array)
    I'm going to continu searching a solution using add_filter and php functions.

    Regards,
    Sébastien

  5. s.edel
    Member
    Posted 2 years ago #

    I've found a way to manage array using add_filter.
    Need php knowledge.
    See my issue in this forum

  6. zaus
    Member
    Plugin Author

    Posted 1 year ago #

    I'll take a look at your question @s.edel too, but I think what you're looking for is #2 of the "Other Notes - Hooks" section. You'd need a callback to modify the value returned by CF7 and turn it into the expected format.

    For your case, you mentioned it returns an array, so you'd need to implode it (or something similar) to turn it into a string and update the submission array. Is that what you're asking?

  7. zaus
    Member
    Plugin Author

    Posted 1 year ago #

    Oh, just noticed the other post is already marked as resolved -- linking to @s.edel's solution in the other post he mentioned and closing:
    http://wordpress.org/support/topic/plugin-contact-form-7-3rd-party-integration-how-to-interract-with-cf7-fields-using-hooks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic