Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

362
Views
Can you have a text variable shown within a text node?

I am trying to a text node, where to states the user's name they chose at the start through a textbox to be displayed within a text node and wondering if it is possible. This is what I've done so far and it isn't working. Also, a unique piece of dialogue comes up if named Andrew.

      //if statement to determine the users name and save it
      if (nextTextNodeId == 60) {
      var InputName = document.getElementById('name').value
      name = InputName
      setState: { InputName: name }
      if (name == "Andrew") {
          ToggleInputOff()
          state = Object.assign(state, option.setState)
          showTextNode(4)
          return;
      }
      else if (name == "") {
          state = Object.assign(state, option.setState)
          showTextNode(3)
          return; 
      }
      else {
          ToggleInputOff()
          state = Object.assign(state, option.setState)
          showTextNode(5)
          return;
      }
      return ToggleInputOff()
      }

      //Example
        {
            id: 5,
            text: "Welcome " + name + " let us start the day!",
            options: [
                {
                    text: "Let's go",
                    nextText: 6
                }

            ]
        },

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!