Coding error in Corvid -trying to create Show More text & button

Hi, I have followed the tutorials to set up a new article on our site that has the Show More button to show full article if desired.
I have put the coding in to Corvid, as directed but I am getting the errors as follows.

  • Parsing error: Unexpected character ‘#’
    I could see the issue so removed the # but then I get a different error,
  • ‘text5’ is not defined.
    I’m pretty sure that the # is required as this is the name to replace the generic code in the tutorial - $w(“#myTextElement”).text = shortText;
    I just seem to be going in circles and not sure how to sort it out.

Here is a screen shot of the full code I have got input:


Thanks for any help you can offer :slight_smile:
Simone

You inadvertantly omitted the quotes from the component ID. It should be:

fullText = $w(‘#text5’).text;

Make sure to add the quotes to the component IDs in all of the other lines of code as well.