GithubHelp home page GithubHelp logo

Comments (8)

andrewtelnov avatar andrewtelnov commented on August 25, 2024 1

@chrisweconect I will introduce onQuestionCreating event and will do an example. It will be available in the next minor. I think we will release it early next week.
You will be able to try it early if you build the library by yourself. The instruction in the readme file.
Please follow these issues:
#51
#52

Thank you,
Andrew

from survey-creator.

andrewtelnov avatar andrewtelnov commented on August 25, 2024

@chrisweconect At the current moment there is no way to make the property read-only in the editor. You may only hide it. Additionally the name property can be added in the question editor as well.
Do you want to hide it completely or do you want to make it read-only?
We will have to add an event or something in the API to support read-only properties.

About custom name generation - I think the best solution is to have onQuestionCreating event, where a new created question will be passed, before adding it to the survey. On this event you will be able to change any question property including the name.
Will it work for you?

Thank you,
Andrew

from survey-creator.

chrisweconect avatar chrisweconect commented on August 25, 2024

@andrewtelnov - Thanks for the quick reply. We would prefer to make the "name" field read-only. How do we create an onQuestionCreating event? Any example of how to do that?

Thanks,
Chris

from survey-creator.

chrisweconect avatar chrisweconect commented on August 25, 2024

@andrewtelnov - Any updates making the "name" field read-only? Or making the "name" field a unique ID? Looking forward to this update.

Thanks,
Chris

from survey-creator.

andrewtelnov avatar andrewtelnov commented on August 25, 2024

@chrisweconect I am working on it right now. I have introduced readonly attribute for JsonProperties a week ago: surveyjs/survey-library@929917d
At the current moment I am changing the editor.
I'm fully refactoring the first ("General") tab of the Question Editor. I want to give the ability to add/remove properties and customize the layout of "General" tab. At the current moment it is hardcoded.
I'am not sure about this week, but definitely on the next week you will have this functionality.
You will have to include the following code:
JsonObject.metaData.findProperty("questionbase", "name").readOnly = true;

Thank you,
Andrew

from survey-creator.

chrisweconect avatar chrisweconect commented on August 25, 2024

@andrewtelnov - Thanks!

I look forward to this new release.

Chris

from survey-creator.

andrewtelnov avatar andrewtelnov commented on August 25, 2024

@chrisweconect
It is implemented:
#52
#62

We will make a release on the next week. If you need it early, you have to rebuild surveyjs library and editor.

Thank you,
Andrew

from survey-creator.

andrewtelnov avatar andrewtelnov commented on August 25, 2024

@chrisweconect Here is the demo

from survey-creator.

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.