Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabulator: The Comment box value replaces the Other option value in Checkboxes questions #403

Closed
JaneSjs opened this issue Mar 13, 2024 · 1 comment · Fixed by surveyjs/survey-library#7952
Assignees
Labels
bug user issue An issue or bug reported by users

Comments

@JaneSjs
Copy link
Contributor

JaneSjs commented Mar 13, 2024

T17243 - A comment value replaces the Other option value
https://surveyjs.answerdesk.io/internal/ticket/details/T17243


A checkbox has the Other and Comment options enabled.
image

{
 "pages": [
  {
   "name": "Seite1",
   "elements": [
    {
     "type": "checkbox",
     "name": "Frage1",
     "title": "Q1",
     "showCommentArea": true,
     "commentText": "Comment",
     "choices": [
      "Item 1",
      "Item 2",
      "Item 3"
     ],
     "showOtherItem": true
    }
   ]
  }
 ],
 "showPreviewBeforeComplete": "showAnsweredQuestions",
 "widthMode": "responsive"
}

A survey response.

{
    "Frage1": [
        "Item 1",
        "Item 2",
        "Other Value"
    ],
    "Frage1-Comment": "Some comment here"
}

A table displays the Comment value in the Other column as well as in the Q1 column:
image

@JaneSjs JaneSjs added the user issue An issue or bug reported by users label Mar 13, 2024
@JaneSjs JaneSjs changed the title The Comment box value replaces the Other option value Tabulator and Checkboxes - The Comment box value replaces the Other option value Mar 13, 2024
@JaneSjs JaneSjs added the bug label Mar 13, 2024
@andrewtelnov
Copy link
Member

@tsv2013 Please use public getStoreOthersAsComment(): boolean function in selectbase.

  public getStoreOthersAsComment(): boolean {
    if (this.isSettingDefaultValue) return false;
    if(this.showCommentArea) return false;
    return (
      this.storeOthersAsComment === true ||
      (this.storeOthersAsComment == "default" &&
        (this.survey != null ? this.survey.storeOthersAsComment : true)) ||
      (this.hasChoicesUrl && !this.choicesFromUrl)
    );
  }

Thank you,
Andrew

@andrewtelnov andrewtelnov assigned tsv2013 and unassigned andrewtelnov Mar 13, 2024
tsv2013 pushed a commit to surveyjs/survey-library that referenced this issue Mar 13, 2024
…Comment box value replaces the Other option value
andrewtelnov added a commit to surveyjs/survey-library that referenced this issue Mar 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…play-value

Fixed surveyjs/survey-analytics#403 - Tabulator and Checkboxes - The Comment box value replaces the Other option value
@RomanTsukanov RomanTsukanov changed the title Tabulator and Checkboxes - The Comment box value replaces the Other option value Tabulator: The Comment box value replaces the Other option value in Checkboxes questions Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug user issue An issue or bug reported by users
Projects
None yet
3 participants