Skip to main content
Solved

Why do my names come in as ['Test'] ['Submission'] rather than Test Submission?

  • March 30, 2023
  • 2 replies
  • 63 views

Forum|alt.badge.img+4

I am sending a legacy form using the values $first_name and $last_name and intead of plain text, they’re arriving as what looks like array items.

So...

Test Submission

….when looking at the submitted data, appears as

['Test'] ['Submission']


Why is this happening - and what can I do to submit this as plain text? It’s coming though to the email like this too.

Below are the form fields from my legacy form. This also looks the same when changed to first_name and last_name without the dollar prefix.
 

<input type="hidden" name="$fields" value="$consent,$first_name,$last_name,email">

<input type="hidden" name="$list_fields" value="$consent,$first_name,$last_name,emailconsent">



<input type="text" value="" name="$first_name" id="k_id_firstname" placeholder="First name" />

<input type="text" value="" name="$last_name" id="k_id_lastname" placeholder="Last name" />

<input type="email" value="" name="email" id="k_id_email" placeholder="Email" />


​​​​​​​Any help appreciated. Thanks.

Best answer by tribedevs

Fixed it myself. Seems sending the $list_fields hidden field above, was the culprit. Just need to send $fields. Removing the line below solved it.

<input type="hidden" name="$list_fields" value="$consent,$first_name,$last_name,emailconsent">

2 replies

Forum|alt.badge.img+4
  • Author
  • Contributor I
  • 1 reply
  • Answer
  • March 31, 2023

Fixed it myself. Seems sending the $list_fields hidden field above, was the culprit. Just need to send $fields. Removing the line below solved it.

<input type="hidden" name="$list_fields" value="$consent,$first_name,$last_name,emailconsent">

Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • March 31, 2023

Hi @tribedevs!

 

Glad to hear you found the solution! Thanks so much for sharing it with the Community so that others can learn from this in the future!

 

Best,

Brian