Hello I want to know how to create dynamic text with static text using the element values of a repeater
Here is the code that I put in place but it does not work
$w.onReady( () => {
$w("#dataset42").onReady( () => {
let description= $w("#dataset42").getCurrentItem().text;//text is the field you want to get its text
$w("#text14").text = "first static text" + description + " second static text" ;
} );
} );
Thanks
https://www.bookingseminaires.com/recherche-lieux-congres-seminaire
here is the link to my website
at the page, click on the search button.
Thank you for your help.
Hello Here is my code recovered from a post by @Mustafa Hammouz
The problem is that the text dynamic must take the value of a text box which is in a repeater
Can you help me?
Thank you
$w.onReady( () => { $w("#dataset1").onReady( () => { let description= $w("#dataset1").getCurrentItem().nomDeEtablissement;//text is the field you want to get its text $w("#text14").text = "first static text" + description + " second static text" ; } ); } );
Like this...
$w.onReady( () => { $w("#dataset42").onReady( () => { let description= $w("#dataset42").getCurrentItem().text;//text is the field you want to get its text $w("#text14").text = "first static text" + description + " second static text" ; } ); } );
If you can't get Robert's shortcut to work for you, then simply highlight all your lines of code and click on the code block icon in the bar that appears.
It might also be useful to mention that you are using an example from @Mustafa Hammouz from an old 2018 forum post here.
https://www.wix.com/corvid/forum/community-discussion/insert-dynamic-content-in-static-text
$w.onReady( () => {
$w("#dataset42").onReady( () => {
let description= $w("#dataset42").getCurrentItem().text;//text is the field you want to get its text
$w("#text14").text = "first static text" + description + " second static text" ;
} );
} );
Thanks Robert I did not get what you asked me so I attached a pdf with a screenshot
Please format your code using the 'Code Block' option by pressing Ctrl + Shift + J on Windows or Cmd + Shift + J on Mac and then inserting your code to the block - it will be easier for someone to read and help you.