# \[Solved\] Input field shall contain text from text field via frontend code

**URL:** <https://forum.wixstudio.com/t/solved-input-field-shall-contain-text-from-text-field-via-frontend-code/33336>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [October 21, 2022, 1:31pm UTC](https://forum.wixstudio.com/t/solved-input-field-shall-contain-text-from-text-field-via-frontend-code/33336 "2022-10-21T13:31:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![info25591](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/info25591/32/35304_2.png) [@info25591](https://forum.wixstudio.com/u/info25591)\
**Post date:** [October 21, 2022, 1:31pm UTC](https://forum.wixstudio.com/t/solved-input-field-shall-contain-text-from-text-field-via-frontend-code/33336/1 "2022-10-21T13:31:57Z")

</div>

Hello,

I am total beginner in coding and I guess have a pretty easy question.  
My goal is to have the same information in my Input field as it´s already in my text field via code.  
So in my screenshot it would be the Text field Name into Input field Vor- Nachname and the same for Mitgliedsnummer into another input field.

I tried already different $w( ) functions and also Text and Textinput functions and are not able to create the needed code.

I managed to do it via copy buttons, but not with direct display.

Those anyone has an Idea?

![](https://us1.discourse-cdn.com/wix/original/3X/0/0/008d7881187807dee105daa1045b8bea1f373753.png)

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [October 21, 2022, 8:16pm UTC](https://forum.wixstudio.com/t/solved-input-field-shall-contain-text-from-text-field-via-frontend-code/33336/2 "2022-10-21T20:16:13Z")

</div>

Versuchst du eine Art → PREVIEW herzustellen ?

```javascript
let firstName, lastName, customerID

$w.onReady(()=>{
    $w("#inpFirstname").onChange(()=>{
        $w('#txtFirstname').value = $w("#inpFirstname").value;
    });
    $w("#inpLastname").onChange(()=>{
        $w('#txtLastname').value = $w("#inpLastname").value;
    });
    $w("#inpCustomerID").onChange(()=>{
        $w('#txtCustomerID').value = $w("#inpCustomerID").value;
    });
});

```

Modify all Element-IDs!!!

---

<div class="post-metadata">

**Author:** ![info25591](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/info25591/32/35304_2.png) [@info25591](https://forum.wixstudio.com/u/info25591)\
**Post date:** [October 27, 2022, 8:28am UTC](https://forum.wixstudio.com/t/solved-input-field-shall-contain-text-from-text-field-via-frontend-code/33336/3 "2022-10-27T08:28:45Z")

</div>

Nein ich wollte lediglich eine Übertragung, ohne dass etwas geändert wird.  
Ich hab jedoch eine einfache Lösung gefunden:

$w(‘#firstNameInput’).value = $w(‘#firstNameText’).text

Danke
