Solved

Need Help with Consistent Property Values Across Klaviyo Signup Forms

  • 10 April 2024
  • 3 replies
  • 34 views

Badge

Hi everyone,

I’m facing a bit of a challenge with signup forms and how they handle specific profile properties.

In my setup, I have 2 different signup forms that users can fill out to subscribe to our newsletter. One form includes a checkbox with a profile property of ‘NewsletterConsent’ and a property of ‘true’. The second form has a profile property also of ‘NewsletterConsent’ and a value of ‘true’ attached to the button.

Here’s where I’m having the problem:

  • On one form, when a user checks the checkbox and submits the form, the NewsletterConsent property is updated in the profile as ‘[“true”]’.
  • On the other form, the exact same action results in the property being set as ‘true’ – without the square brackets and quotations.

Ideally, I’d like all submissions to result in simply ‘true’. How should I go about this?

Thanks in advance,

Brian

icon

Best answer by bluesnapper 10 April 2024, 17:54

View original

3 replies

Userlevel 7
Badge +36

Hi @simpliPets

The value [“true”] with brackets and quotations is denoting that the data type is a list (array). List data-types are used if you want a custom property to contain multiple values. For example:

brew_preference = ["espresso","filter"]

I think the issue is that you are using a Multi checkbox block with one option for NewsletterConsent. Multi checkbox values are always stored as a list even if it has only one option. If you change it to a radio button it will be stored as a text string.

Hope that helps

Andy

Badge

Hi @simpliPets

The value [“true”] with brackets and quotations is denoting that the data type is a list (array). List data-types are used if you want a custom property to contain multiple values. For example:

brew_preference = ["espresso","filter"]

I think the issue is that you are using a Multi checkbox block with one option for NewsletterConsent. Multi checkbox values are always stored as a list even if it has only one option. If you change it to a radio button it will be stored as a text string.

Hope that helps

Andy

Hey Andy,

Thanks so much for the reply! That makes sense now. Is it possible though to use a checkbox and have the value stored as a text string? I feel that a checkbox works much better here than a radio button.

Thanks again,


Brian

 

 

Userlevel 7
Badge +36

Hi @simpliPets 

If that’s a Klavio embeded form then a multi check box will always store the value as an array. The reason is that Klaviyo expects multiple options to be avaiable so it needs to be a list data-type.

It would have to be a radio button to store it as a text sring.

Regards

Andy

Reply