surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.13k stars 803 forks source link

placeHolder property for other and comment in the selectBase (radiogroup, checkbox, dropdown) #1703

Closed dmitry-kurmanov closed 5 years ago

dmitry-kurmanov commented 5 years ago

I've added otherPlaceHolder property:

var json = {
    questions: [
      {
        type: "radiogroup",
        name: "car",
        title: "What car are you driving?",
        isRequired: true,
        colCount: 4,
        hasOther: true,
        otherPlaceHolder: "hey ",
        choices: [
          "None",
          "Ford",
          "Vauxhall",
          "Volkswagen",
          "Nissan",
          "Audi",
          "Mercedes-Benz",
          "BMW",
          "Peugeot",
          "Toyota",
          "Citroen"
        ]
      }
    ]
  };
michaelchandrag commented 5 years ago

im using the surveyjs vue quickstart and adding otherPlaceHolder properties, but it didnt work out

{
          name: '3',
          type: 'dropdown',
          title: 'Tempat Lahir (Negara):',
          placeHolder: '',
          choices: ['Indonesia'],
          hasOther: true,
          otherPlaceHolder: 'Other Placeholder',
          // isRequired: true,
          startWithNewLine: true
 }

is there anything did i miss?

michaelchandrag commented 5 years ago

im using the surveyjs vue quickstart and adding otherPlaceHolder properties, but it didnt work out

{
          name: '3',
          type: 'dropdown',
          title: 'Tempat Lahir (Negara):',
          placeHolder: '',
          choices: ['Indonesia'],
          hasOther: true,
          otherPlaceHolder: 'Other Placeholder',
          // isRequired: true,
          startWithNewLine: true
 }

is there anything did i miss?

ok this is fixed by upgrading my survey-vue with npm previously, i am using 1.0.73 and now i am using the latest one 1.1.0

marie-dk commented 2 years ago

I am using surveyjs (1.8.78) for Angular, and otherPlaceholder seems to be ignored:

"name": "page1",
   "elements": [
    {   
     "type": "radiogroup",
     "name": "primary_reason",
     "title": {
      "da": "Vælg din primære årsag",
      "en": "Choose your primary reason?"
     },  
     "isRequired": true,
     "hasOther": true,
     "otherPlaceholder": {
      "da":"Skriv din begrundelse her...",
      "en":"Write your reason here..."
     }, 
     [...]
   }
[...]
dmitry-kurmanov commented 2 years ago

Sorry for the late response. For some reason, I missed the comments above. I will investigate and fix the problem asap.

dmitry-kurmanov commented 2 years ago

@marie-dk I created the separate issue https://github.com/surveyjs/survey-library/issues/3668