Adding text to feedback buttons

Hey Max,

There is a way to add text next to the feedback buttons using the theme. You can add the data mapping feedbackText to the card’s component.js file and set it to the text you want to display next to the buttons.

For more detail on why this works:
Following these instructions to add feedback buttons, the functionality for these buttons is in the file themes/answers-hitchhiker-theme/cards/common-partials/thumbsfeedback.hbs. Navigating to this file, you’ll see that there’s a Handlebars expression for {{feedbackText}} on line 62 below. When the template is executed by the card, this expression will be replaced by the value we provide in the component.js file. There are Handlebars expressions in this screenshot for feedbackTextOnSubmission and positiveFeedbackSrText, which are in the card component.js file by default.

Add the data mapping feedbackText to the component.js file and set it to the text you want to display next to the buttons.

1 Like