# Changing input value to clicked text field's value

**URL:** <https://forum.bubble.io/t/changing-input-value-to-clicked-text-fields-value/8333>\
**Category:** Need help\
**Created:** [November 29, 2016, 6:35am UTC](https://forum.bubble.io/t/changing-input-value-to-clicked-text-fields-value/8333 "2016-11-29T06:35:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![petter](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/petter/32/98626_2.png) [@petter](https://forum.bubble.io/u/petter)\
**Post date:** [November 29, 2016, 6:35am UTC](https://forum.bubble.io/t/changing-input-value-to-clicked-text-fields-value/8333/1 "2016-11-29T06:35:36Z")

</div>

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

![](https://us1.discourse-cdn.com/bubble/original/2X/2/25825c7f7a7033e277ccb8d8e65acc5bb3311696.jpg)

(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?

---

<div class="post-metadata">

**Author:** ![mishav](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mishav/32/6420_2.png) [@mishav](https://forum.bubble.io/u/mishav)\
**Post date:** [November 29, 2016, 11:51am UTC](https://forum.bubble.io/t/changing-input-value-to-clicked-text-fields-value/8333/2 "2016-11-29T11:51:29Z")

</div>

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:  
 ![](https://us1.discourse-cdn.com/bubble/original/2X/1/1c4ba25ed8b3832b13284dd3d916d8f7a8c091ba.png)

Then instead of clicking “More…”, click to the right of it:  
 ![](https://us1.discourse-cdn.com/bubble/original/2X/c/cbdc4b718b02911bd8684c9aebb822685f959020.png)

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

![](https://us1.discourse-cdn.com/bubble/original/2X/2/262ba2bea07f01222aebc21adda75b28f28942e9.png)

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

> [@petter](#):
>
> I’m surprised that I find this so difficult.

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.
