Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doubt] How to store a user input and use it later #385

Open
faze-geek opened this issue Apr 25, 2024 · 1 comment
Open

[Doubt] How to store a user input and use it later #385

faze-geek opened this issue Apr 25, 2024 · 1 comment

Comments

@faze-geek
Copy link

Describe the bug
A clear and concise description of what the bug is.

I basically want to store my user input at some point and then use it later. Similar to previousValue

To Reproduce

const steps = [
    {
      id: '0',
      message: 'Hey User!',
      trigger: '1',
    }, {
      id: '1',
      message: 'Please write your username',
      trigger: '2'
    }, {
      id: '2',
      user: true,
      trigger: '3',
    }, {
      id: '3',
      message: `Hi {previousValue}, how can I help you, ${userName}?`,
      trigger: '4'
    }, {
      id: '4',
      options: [
        {
          value: 1,
          label: 'Report a user',
          trigger: '5',
        },
        {
          value: 2,
          label: 'Report app issue',
          trigger: '11',
        },
        { value: 3, label: 'Need help' },
      ],
    }, {
      id: '5',
      message: 'Which User do you want to Report?',
      trigger: '6',
    }, {
      id: '6',
      user: true,
      trigger: '7',
      delay: 1000,
    }, {
      id: '7',
      message: 'What problem did the User cause?',
      trigger: '8',
    }, {
      id: '8',
      user: true,
      trigger: '9',
      delay: 1000,
    }, {
      id: '9',
      message: '{previousValue} has been warned',
      trigger: '4',
    }, {
      id: '10',
      options: [
        {
          value: 2,
          label: 'Report app issue',
          trigger: '11',
        },
        { value: 3, label: 'Need help' },
      ],
    }, {
      id: '11',
      message: 'What issues do you have with the application?',
      trigger: '12',
    }, {
      id: '12',
      user: true,
      trigger: '13',
      delay: 1000,
    }, {
      id: '13',
      message: 'We will work on this issue and get back to you!',
      end: true,
    }
  ];

Expected behavior
A clear and concise description of what you expected to happen.

I want to use the name that should be reported. Here {previousValue} leads to -
Stole has been warned

Instead of -
Harshit has been warned

Screenshots
If applicable, add screenshots to help explain your problem.

image

@faze-geek
Copy link
Author

@LucasBassetti The work done in this project is commendable. I couldn't find any active mailing list so I asked my doubt here itself.
Would appreciate if you can help be out here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant