When I create a multi-value textfield I get "Array" in the first box.

It happens regardless of whether the number of additional fields is limited or not. See attached screenshots.

Comments

stella created an issue. See original summary.

jrockowitz’s picture

StatusFileSize
new2.41 KB

I can't duplicate this issue. Attached is the test form I created attempting to duplicate the problem.

stella’s picture

Hmmm odd, I can't reproduce it with your form either... i'll see if i can figure it out

stella’s picture

StatusFileSize
new2.59 KB

Ok as best as I can figure out, it happens when it is a required field and it appears on a step other than the first step in a multistep form. Form config attached (I love CMI!)

jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new1.03 KB

I am crossing my fingers, that the attached patch will solve the problem.

Status: Needs review » Needs work

The last submitted patch, 5: text_field_with-2864411-5.patch, failed testing.

jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new854 bytes
jrockowitz’s picture

@stella please review and confirm that this patch works. Thanks.

prashant.c’s picture

StatusFileSize
new27.21 KB

@stella

PFA I could not reproduce the issue with textfield for multiple values.

Can you please list down the steps to re-generate this issue ?

jrockowitz’s picture

@Prashant.c The form from #4 reproduces the issue.

The issue is that a required multiple value element within a multistep form is not maintaining its #default_value correctly.

stella’s picture

Status: Needs review » Reviewed & tested by the community

@jrockowitz yep! that works perfectly, thanks!

  • jrockowitz committed b40afcb on 8.x-5.x
    Issue #2864411 by jrockowitz, stella, Prashant.c: Text field with...
jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.