Forum Academy Marketplace Showcase Pricing Features

Changing input value to clicked text field's value

I’m struggling to populate an input text field when a user clicks a name in a repeated group.

(yes, I am naming my test users after GoT characters)

The “Who is it for” field should be populated with the name clicked (1). I could change the state in the text field, but state seems to only work with one field (for example “State = First name”, but not more than one “State = First name and Last name”). I could add a field to User that combines first and last name, but it doesn’t seem very intuitive.

I’m surprised that I find this so difficult. Am I overlooking some obvious solution here?

I take it you’re setting the “Initial content” of the Text Input to be the custom state’s value?

You can join the two values together when setting the custom state value:

First value:

Then instead of clicking “More…”, click to the right of it:

Then type in a space, kind of hard to see, then click for the other field:

Note this is not taking into account users entering spaces at the end or start, or leaving either field empty.

Some things that seem like they should be easy, aren’t. A trade-off for making other things easy. You can drop your expectations just inside the door, on top of the pile of my expectations.

1 Like