• When having a custom attribute in Sendinblue with a type of boolean, and using this field in a contact form, the value doesn’t find its way to Sendinblue.

    We have tried to use all sorts of form fields, checkboxes, select, radio, etc. but in no case the attribute gets prefilled in Sendinblue.

    Values of “true”, “1”, “yes” all won’t work out.

    Text fields are submitted correctly. But how can we send booleans?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the website in question?

    Thread Starter phpbot

    (@phpbot)

    For now, it’s just a local installation of https://localwp.com

    However, just created a blank installation with CF7 and the only fields I was able to submit to SIB, were the email field and text fields. So, since it is a totally blank installation, it should be possible to reproduce that quite fast.

    Using select in CF7 and a category field type in SIB doesn’t submit any value.

    The same goes for checkbox in CF7 and boolean in SIB.

    These data types seem to be passed incorrectly, I guess?

    Just to note, the API connection is set up successfully and submitting forms creates new contacts with the mentioned field values (email, text).

    Also, field names are correctly prefixed with your-.

    Anything we can do to submit other data types through the corresponding form fields?

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    See Editing form template

    What content do you have in the Form tab panel?

    Thread Starter phpbot

    (@phpbot)

    [text* your-firstname "skllslslk"]
    [email* your-email "[email protected]"]
    [checkbox* your-test_bool use_label_element "dsksdkldksl"]
    [select your-test_cat "some val" "another val"]
    [submit "Submit"]
    • This reply was modified 4 years, 2 months ago by phpbot.
    Plugin Author Takayuki Miyoshi

    (@takayukister)

    What contact attributes do you have on Sendinblue?

    Thread Starter phpbot

    (@phpbot)

    * TEST_BOOL (boolean)
    * TEST_CAT (category)

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    OK, thanks. I’ll look into it.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    The simplest way to work around this situation is to dynamically edit the Sendinblue contact parameters using the wpcf7_sendinblue_collect_parameters filter hook.

    The following is an example customization that assumes TEST_BOOL is a boolean attribute:

    add_filter( 'wpcf7_sendinblue_collect_parameters',
    	function ( $params ) {
    		$params['TEST_BOOL'] = ! empty( $params['TEST_BOOL'] );
    		return $params;
    	},
    	10, 1
    );
Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Sendinblue boolean attribute field doesn’t send any value’ is closed to new replies.