Giter Club home page Giter Club logo

Comments (8)

andrewtelnov avatar andrewtelnov commented on May 15, 2024 1

@PankajKumawat125 you may get a question and set the choices:
var question = survey.getQuestionByName("myQuestionName");

question.choices = [1, 2];
//or 
question.choices = [{value: 1, text: "item 1"}, {value: 2, text: "item 2"}];

Thank you,
Andrew

from survey-library.

andrewtelnov avatar andrewtelnov commented on May 15, 2024

Please refer to this issue: #67

from survey-library.

andrewtelnov avatar andrewtelnov commented on May 15, 2024

Hi,
I have implemented the first variant of the feature. Could you check it out?
I am going to work on property editor now. I also thinking about having a parameter support in the url. For example, when you have the employee list and you may show it only after the person select the department. So you do not show the full list, but filtered by a parameter, previous answered question value. Do you need this?

Thank you,
Andrew

from survey-library.

andrewtelnov avatar andrewtelnov commented on May 15, 2024

Please, take a look at: http://surveyjs.org/examples/questiontype-dropdownrestfull.html

from survey-library.

PankajKumawat125 avatar PankajKumawat125 commented on May 15, 2024

Hi,
Can i call a function in js instead of URL for fetching data and bind with dropdown?

from survey-library.

PankajKumawat125 avatar PankajKumawat125 commented on May 15, 2024

@andrewtelnov Perfect. work fine.
Can you help me with one more thing ?
If i want to pre-select one of the value and show the dropdown then How do i do that?

from survey-library.

andrewtelnov avatar andrewtelnov commented on May 15, 2024

@PankajKumawat125 survey.setValue("YourQuestionName", defaultValue); example
or use the defaultValue property in the question, defaultValue: yourDefaultValue.

Please go through our demos. You are asking very basic questions.

Thank you,
Andrew

from survey-library.

PankajKumawat125 avatar PankajKumawat125 commented on May 15, 2024

@andrewtelnov Well, I have already done that. i was just going to delete my 2nd question.
and
In this case it was fetching dynamically, that is why i asked you this question!
Anyways thank you so much for your help

from survey-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.