How do I output the results of an array as a String?

Here is my Input Field in a form. Blank, with a placeholder.

Here is my Server Action with $_POST as my expression for a repeat. Then, in the repeat, Set Value for a variable called parts_results.

image

The results in DevTools is exactly what I want to see in the resultant Input Field.

But my resultant Input Field only displays a full-stop! As shown in the Server Action above.

Because the full-stop is showing, just proves that something is working.

Why am I not getting the full results?

Try pre-defining parts_results before the repeat to any dummy value

try please ,
{{parts_repeat.join(",","parts_results") + "'.'"}}

Brian, that didn't make any difference.

Serhat, that only put single brackets around the full-stop '.'

{{parts_repeat.join(",","parts_results+'.'")}}

This time, an empty result in both the DevTools and the Input Field :frowning_face:

well lets create second variable like parts_output then merge it
so

{{parts_output + secondvar}}

1 Like

is it ok , working ?

No, just about to try it. Sorry liked for the idea, not for working :confused:

1 Like

Ignore the repeat in the middle

image

So that simple test works.

1 Like

Can @Teodor, @George or @patrick help with this one? Sorry to drag you in.

Seeing the correct result in devtools from the server action it looks like that part is correct. How do you set the value to the input?

Hi @patrick, thanks for coming back to me on this. The Input Field is simply this

<input type="text" class="form-control" id="inp_diag_diag_png" name="diag_diag_png" aria-describedby="inp_diag_diag_png_help" placeholder="Diagram png">

And I use a button in a modal to populate the form

<button class="btn btn-primary" dmx-on:click="form_new_ad_report.inp_diag_diag_png.setValue(sc_ad_test_ins.data.parts_output)" type="submit">Insert List</button>

I can give you access if you require.

That all looks good, don’t see a problem there. If you have a link I could check, perhaps I can figure out what goes wrong.

Good morning @patrick, did you get my PM last night with login details?

By the way, Looking for help with Radio Buttons relates to this.