Hi
I have text element that connected to db collection, and i want to get the value of this text element (this text is all the time change beacause its apear on a dynamic page).
Which function i need to use?
Perhaps something like this:
let textValue = $w("#text").text;
See the $w.Text.text API for details.
i treid to do this, i want to set the text value into a input text
this is the code:
$w.onReady( function () {
let textValue = $w(“#text105”).text;
$w(‘#input1’).value=textValue;
});
but it doesn’t get the value from the text
Please understand that in order to provide assistance, you will need to give more information. What is the screen image above? Is that #input1? If so, it’s showing content.
i build dynamic page for students. the web should be used by the teachers crew. on the dynamic page aprears the student’s ID. the teacher can add feedback on the dynamic page. i want that when the teacher add a feedback, it will show on “feedbacks” collection with the student’s ID and the name of the teacher that loged in and owner of the feedback.
i hope its clear, thank u for your help.
input1 its a input filed that i added. i want that on this input will display the id value from the text and when i will enter submit the feedback will send to db with the is of the student
Please post the editor URL of your site. Only authorized Wix personnel can get access to your site in the editor. Please include the name of the page involved.
more simple -
i have 2 input fileds, the upper is “input1” and the other is “input2”.
i want that the value of input1 display also on input2.
this is my code:
$w.onReady( function () {
let textValue = $w(‘#input1’);
$w(‘#input2’).value= textValue;
});
You might want to check out the WixArena - it’s a hub where you can look for Corvid (and other) experts for hire.
Try this:
$w.onReady(function () {
let textValue = $w(’ #input1 ').value;
$w(’ #input2 ').value = textValue;
});
Or:
$w.onReady(function () {
$w(’ #input2 ‘).value = $w(’ #input1 ').value;
});
its not working :(((((((((
Old post closed due to spam appearing at end.