question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handling button after view submission?

See original GitHub issue

Description

Dear developers, bolt is awesome, thanks for making this available! I have a question about handling buttons after view submissions. My process is as follows:

  1. Post a message with one action button.
  2. Click the button and open a view.
  3. Submit the view.

In bolt, the app.view construct has an ‘ack’ function but not a ‘say’ or ‘response’ function. How would I update the action button at step (1) to show a user that this view was submitted? I want to disable that button.

I hope you can help me!

PS: this is related (https://github.com/slackapi/bolt/issues/305) but I think we can only use ack() for error handling.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
  • I’ve read and agree to the Code of Conduct.
  • I’ve searched for any related issues and avoided creating a duplicate issue.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
robinpapacommented, Feb 4, 2020

@aoberoi That’s the solution! JSONify the string. Thank you!

1reaction
stevengillcommented, Jan 29, 2020

Hey @robinpapa,

I haven’t looked into this, but I think chat.update would allow you to update the original message (as well as the button). Want to try it out in your view submission handler?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling button after view submission? · Issue #386 - GitHub
I have a question about handling buttons after view submissions. My process is as follows: Post a message with one action button.
Read more >
Using modals in Slack apps
An app has the ability to close views within a modal. This can happen only in response to the user clicking a submit...
Read more >
How to prevent buttons from submitting forms - Stack Overflow
Just add e.preventDefault(); in your method should prevent your page from submitting forms. function ...
Read more >
Form submission — why it's crucial to use a button of submit type
I advised the developer to change the button's type (to submit one) and register an event handler for the ngSubmit event at the...
Read more >
HTML submit button onclick code - HTML Form Guide
Returning false from the onsubmit event handler of the form stops the form being submitted. So the submit button has a meaningful existance...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found