Solved

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

  • 30 March 2023
  • 2 replies
  • 38 views

Badge +3

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.

icon

Best answer by tribedevs 31 March 2023, 05:11

View original

2 replies

Badge +3

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">
Userlevel 7
Badge +36

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

Reply