How do you have a richwidgets feedback_message within a submit action?

I have a button which downloads a file so the button has to be a submit.  However, I want to have a feedback_message in the action to let the person know the report is complete.  It seems like with the button set to submit the feedback_message never displays.

Jason Herrington wrote:

I have a button which downloads a file so the button has to be a submit.  However, I want to have a feedback_message in the action to let the person know the report is complete.  It seems like with the button set to submit the feedback_message never displays.

Can you share a snap of Button-OnClick Action


assif_tiger wrote:

Jason Herrington wrote:

I have a button which downloads a file so the button has to be a submit.  However, I want to have a feedback_message in the action to let the person know the report is complete.  It seems like with the button set to submit the feedback_message never displays.

Can you share a snap of Button-OnClick Action



Hi,

You might be confusing the Feedback_Message action with the Feedback_Message widget.

Here's the Feedback_Message action, which obviously you are using on your application:

Here's the Feedback_Message widget, which is a web block also found in the RichWidgets module:


For the action to work, the screen must include the widget. This is usually included in the Layout web block, so you don't need to think about it. But if you create your own theme, or create a screen that uses a different layout block, you might easily forget this dependency.

Try adding this widget to the end of your screen, or to the layout web block that it uses. If you continue facing the same problem, please attach your module so we can help you more effectively.


Cheers

assif_tiger wrote:

Hi,

You might be confusing the Feedback_Message action with the Feedback_Message widget.

Here's the Feedback_Message action, which obviously you are using on your application:

Here's the Feedback_Message widget, which is a web block also found in the RichWidgets module:


For the action to work, the screen must include the widget. This is usually included in the Layout web block, so you don't need to think about it. But if you create your own theme, or create a screen that uses a different layout block, you might easily forget this dependency.

Try adding this widget to the end of your screen, or to the layout web block that it uses. If you continue facing the same problem, please attach your module so we can help you more effectively.


Cheers

I have never had to use that widget.  I made a new button which I set with ajax submit, made an action with the feedback_message action and it works fine.  I think what is causing it not to work is that the buttons for the action I stated above have to be submit as I am downloading a file at the end of the action.  It seems like submit makes feedback_message not work.


Solution

Jason Herrington wrote:

I have a button which downloads a file so the button has to be a submit.  However, I want to have a feedback_message in the action to let the person know the report is complete.  It seems like with the button set to submit the feedback_message never displays.

Hi Jason Herrington,

The download prevents the Feedback_Message from being displayed in the screen.. Even if it's called first.

So you can try with another method.,

Create a button with the following action.

 

In the widget click give the id of the button which is having the download function and make the extended properties to   

Regards,

Ellakkiya

Solution

Ellakkiya Selvadurai wrote:

Jason Herrington wrote:

I have a button which downloads a file so the button has to be a submit.  However, I want to have a feedback_message in the action to let the person know the report is complete.  It seems like with the button set to submit the feedback_message never displays.

Hi Jason Herrington,

The download prevents the Feedback_Message from being displayed in the screen.. Even if it's called first.

So you can try with another method.,

Create a button with the following action.

 

In the widget click give the id of the button which is having the download function and make the extended properties to   

Regards,

Ellakkiya

Ellakkiya - that worked!  I did modify it slightly as I wanted it to run and create the report THEN notify the person that the report was complete but its working now.


Ellakkiya Selvadurai wrote:

Jason Herrington wrote:

I have a button which downloads a file so the button has to be a submit.  However, I want to have a feedback_message in the action to let the person know the report is complete.  It seems like with the button set to submit the feedback_message never displays.

Hi Jason Herrington,

The download prevents the Feedback_Message from being displayed in the screen.. Even if it's called first.

So you can try with another method.,

Create a button with the following action.

 

In the widget click give the id of the button which is having the download function and make the extended properties to   

Regards,

Ellakkiya

Quick correction to this - and this is a bit sub optimal but as you said it seems to be the only way to get it to work.  If you do the first button click (the one the user sees) as a submit, even if you do widget click in it on a hidden button with ajax submit set to it and the feedback in there - it still doesn't let the feedback be shown.  So, the initial button you do that the user sees has to be set to ajax submit.  In my case, they are running a report that may take several minutes, so I don't want the feedback to be shown until the report is complete. So what I had to do was have the initial button actually make the report, save it to a local variable, do the feedback, then do a widget click on the hidden button that has type set to submit and then in that action it just downloads the local file.  So I think I am passing that report back and forth a few more times that I really should be between the server and the client, which will slow this down a bit, but this seems to be the only way to have a download and a feedback AND show the feedback message AFTER the report has been completed.  If I didn't care about that last part I could have the first action (the visible button click) be ajax submit, show the feedback and then do the widget click - then in the submit action create the report and download it immediately which I think would be a bit faster.


Jason Herrington wrote:

Ellakkiya Selvadurai wrote:

Jason Herrington wrote:

I have a button which downloads a file so the button has to be a submit.  However, I want to have a feedback_message in the action to let the person know the report is complete.  It seems like with the button set to submit the feedback_message never displays.

Hi Jason Herrington,

The download prevents the Feedback_Message from being displayed in the screen.. Even if it's called first.

So you can try with another method.,

Create a button with the following action.

 

In the widget click give the id of the button which is having the download function and make the extended properties to   

Regards,

Ellakkiya

Quick correction to this - and this is a bit sub optimal but as you said it seems to be the only way to get it to work.  If you do the first button click (the one the user sees) as a submit, even if you do widget click in it on a hidden button with ajax submit set to it and the feedback in there - it still doesn't let the feedback be shown.  So, the initial button you do that the user sees has to be set to ajax submit.  In my case, they are running a report that may take several minutes, so I don't want the feedback to be shown until the report is complete. So what I had to do was have the initial button actually make the report, save it to a local variable, do the feedback, then do a widget click on the hidden button that has type set to submit and then in that action it just downloads the local file.  So I think I am passing that report back and forth a few more times that I really should be between the server and the client, which will slow this down a bit, but this seems to be the only way to have a download and a feedback AND show the feedback message AFTER the report has been completed.  If I didn't care about that last part I could have the first action (the visible button click) be ajax submit, show the feedback and then do the widget click - then in the submit action create the report and download it immediately which I think would be a bit faster.


Hi Jason Herrington,

Thankyou for explaining.