Skip Navigation
Expand
Modifying the AnswerFeedback widget to display ranking feedback options
Answer ID 4748   |   Last Review Date 10/07/2021

With the AnswerFeedback widget option set to 5, why isn't is displaying five feedback options?

Environment:  

Customer Portal, Answer feedback

Issue:

I have modified the standard AnswerFeedback widget to display in ranking by changing the num_options ="5" and ratings="true", but it still isn't displaying five feedback options.

Resolution:


To offer more than Yes and No feedback options:

 

1. Open the detail.php file in the /views/pages/answers folder.


2. Locate the following line of code.

 

<rn:widget path="feedback/AnswerFeedback" label_title="#rn:msg:IS_THIS_ANSWER_HELPFUL_LBL#"/>

3. Edit the code to add the options_count attribute to the widget. The modified code will resemble the following.
 

<rn:widget path="feedback/AnswerFeedback" label_title="#rn:msg:IS_THIS_ANSWER_HELPFUL_LBL#" options_count="5" />

 

4. If you want the options to appear in descending order rather than the default ascending order, add the options_descending attribute to the code, which will resemble the following.

<rn:widget path="feedback/AnswerFeedback" label_title="#rn:msg:IS_THIS_ANSWER_HELPFUL_LBL#" options_count="5" options_descending="true" />

5. If you want to explain the rating scale, you can edit the label_title attribute as well. The following code is an example of what you might add.

 

<rn:widget path="feedback/AnswerFeedback" label_title="#rn:msg:IS_THIS_ANSWER_HELPFUL_LBL#" options_count="5" label_title="Rate this answer for helpfulness by selecting between 1 (low) and 5 (high) stars" />

6. If you want to display a numerical percentage rating instead of the default stars that are used when more than two responses are offered, add the use_rank_labels attribute, shown in the following example.

 

<rn:widget path="feedback/AnswerFeedback" label_title="#rn:msg:IS_THIS_ANSWER_HELPFUL_LBL#" options_count="5" label_title="How useful is this answer?" use_rank_labels="true" />

The rank labels have default values in the message base. RANK1_LBL is 0%, RANK2_LBL is 25%, RANK3_LBL is 50%, RANK4_LBL is 75%, and RANK5_LBL is 100%. As a result, if you define options_count to be 3 or 4 instead of 5, the scale will be incorrect. For example, selecting three options means the labels will be 0%, 25%, and 50%. To have your scale span the full 0-100% range with fewer than five options, you must edit the message bases.

For three options, set RANK1_LBL to 0%, RANK2_LBL to 50%, and RANK3_LBL to 100%. With four options, you’ll set RANK1_LBL to 0%, RANK2_LBL to 33%, RANK3_LBL to 67%, and RANK4_LBL to 100%. To find these message bases, first open the Message Base editor. (Click the Configuration button and double-click Message Bases under Site Configuration.) In the Search window, type rank* in the Key field and locate the labels in the report. Refer to Editing message bases if you need more help.

You can also edit these message bases to label the options with non-numeric terms, for example, “No,” “Partially,” “Mostly,” and “Yes.”


Additional information is available in the Customer Portal documentation for your version. To access Oracle B2C Service manuals and documentation online, refer to the Documentation for Oracle B2C Service Products.