# Creating A Dynamic Feedback Box

**URL:** <https://talk.atomisystems.com/t/creating-a-dynamic-feedback-box/8462>\
**Category:** ActivePresenter\
**Created:** [April 8, 2024, 6:06pm UTC](https://talk.atomisystems.com/t/creating-a-dynamic-feedback-box/8462 "2024-04-08T18:06:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregs](https://talk.atomisystems.com/user_avatar/talk.atomisystems.com/gregs/32/6695_2.png) [@gregs](https://talk.atomisystems.com/u/gregs)\
**Post date:** [April 8, 2024, 6:06pm UTC](https://talk.atomisystems.com/t/creating-a-dynamic-feedback-box/8462/1 "2024-04-08T18:06:41Z")

</div>

Using JavaScript - we can create our own custom feedback box and set the information the way we desire depending on the context. The nice thing is that I can reuse this same box and simply change the information and eliminate the need to create multiple boxes with custom messages. In this tutorial, I will walk you through how we can accomplish this.

**1. Create your custom feedback layer.**

Select View \>\> Feedback Master

Select Insert Layer and select the newly created layer so it is highlighted.  
Be sure to place a check in the box for Text in the placeholders section in the ribbon. Color and style the layer as you desire.

We have a few things to do here…

You will want to rename the objects for your feedback layer so you can easily refer to them later.

I chose to name the Title Box as _feedbackTitle_  
I chose to name the Message Box as _feedbackMsg_  
I chose to name the Button as _feedbackBtn_

![image](https://talk.atomisystems.com/uploads/default/original/2X/9/9151601a955ce9a54be32b0a0cfe168862a94703.png)

Set an onClick action for the button to Hide the Feedback Layer. You may change the text on the button at this time as well if you so desire. I set mine to OK

![image](https://talk.atomisystems.com/uploads/default/original/2X/9/982d434d487e681e6d889262f02246ff1cf520d0.png)

![image](https://talk.atomisystems.com/uploads/default/original/2X/1/1f11deb029b579fc767bc3f0b483a1c9620d4645.png)

Finally, change the name of your feedback layer as desired by clicking Rename.  
For this example, I am changing the name to _myFeedback_

Close the Master View.

![image](https://talk.atomisystems.com/uploads/default/original/2X/6/6fb05eda4f59c262704de127e237db29db950072.png)

**3. Create an event that will call the feedback**

Your event can be whatever it needs to be in order to fit your project.  
For this example I am just making a button with the JavaScript code.

Create a shape on the stage to serve as your button and create an onClick action to Execute JavaScript.

Here is the code you will place in the JavaScript editor.  
Notice that I am showing the feedback box first before setting the text.  
Sometimes the order of things matters.

```auto
// Display the Feedback Box
prez.showFeedbackByName("myFeedback");

// Set the Title Text
prez.object("feedbackTitle").text(
    "Congratulations!"
);

// Set the Message Text
prez.object("feedbackMsg").text(
    "You have successfully created a customizable feedback box that you can easily modify!"
);

```

You would just need to change the title and message to match your project needs.

Now when the learner clicks my button - the feedback will show. This can be a great way to alert the learner to something important in your course.

![image](https://talk.atomisystems.com/uploads/default/original/2X/d/df263968928b60cf4b927ba2705949a36cc41151.png)

Hopefully this will help someone or provide some ideas for a project.

---

<div class="post-metadata">

**Author:** ![PhuongThuy\_Le](https://talk.atomisystems.com/user_avatar/talk.atomisystems.com/phuongthuy_le/32/6090_2.png) [@PhuongThuy\_Le](https://talk.atomisystems.com/u/PhuongThuy_Le)\
**Post date:** [April 9, 2024, 1:40am UTC](https://talk.atomisystems.com/t/creating-a-dynamic-feedback-box/8462/2 "2024-04-09T01:40:52Z")

</div>

Good morning Greg,

We truly appreciate your idea and contribution to our community!  
Thank you for sharing your idea with a detailed description. 💯 💯  
This may help other community members a lot, I believe.

BR,
