Dear Ladies and Gentlemen,
we are using the surveyjs-editor component in our React application to create surveys. Now we want to add custom fields to the property and also insert properties by hotkey with the keyboard.
So we created an overlay where you can select your data to add to the survey. After that you move to the property where to add this as shortkey via keyboard shortcut, e.g. CTRL+E. In the screenshot you can see an example:
The attribute label should be added to the name property of the question. We tried to get elements with but we only get elements from the questions area not the right side from the editor. We would be very happy if you could help us out a little.
We use a React+Redux with a REST-Backend. We will store the generated survey-json in our database and replace the shortcut values with real data, e.g. Label with the label of an object.
Best Regards
Richard Geike
________________________________________________________________
HiScout GmbH
Bouchéstraße 12 // 12435 Berlin // Germany
T: +49 30 3300888-0 // F: +49 30 3300888-99
E: // I:
(PITS) // 12. - 13. September 2017 // Berlin
// 28. - 29. September 2017 // Hamburg
// 10. - 12. Oktober 2017 // Nürnberg
________________________________________________________________
****
HiScout GRC Suite // Unified Governance, Risk & Compliance Management
Mindestinformationen im geschäftlichen E-Mail-Verkehr nach §37a HGB/Legal information:
Sitz der Gesellschaft/Registered office: Berlin
Handelsregistereintrag/Commercial register: Amtsgericht Berlin Charlottenburg - HRB 119470 B
Geschäftsführer/Managing Director: Michael Langhoff
Bitte denken Sie über Ihre Verantwortung gegenüber der Umwelt nach, bevor Sie diese E-Mail ausdrucken./Please consider the environment before printing this email
Hallo,
I can see that you are doing something really cool. Unfortunately, I do not understand the question :(
Do you want to modify the Property Grid which is on the right side? Do you want just to add a new property on the fly? Or just to add a shortcut to a property?
Thank you,
Andrew
Hi Andrew,
on the one hand we want to add new properties and on the other hand we want to insert values via keyboard shortcut, e.g. CTRL+E. The values might be passed as a function callback. Is it better to understand now?
Best Regards,
Richard
Hi Richard,
Here is the example of adding new properties: https://www.surveyjs.io/Examples/Editor/?id=addproperties
The simple solution is to add the onPropertyEditorkeyDown event. Will it work for you?
Thank you,
Andrew
Hi Andrew,
wellt hat looks not so bad, but we also want to add the event to existing properties like „title“. Also we did not found the onPropertyKeyDown event and could not sign a handler to it. Maybe you have a little example for us to show?
Best Regards
Richard
Sure, this event should be working for all properties. The event doesn't exist yet. It was my suggestion. If you beleive it will work for us, then we will add it.
Thank you,
Andrew
That would be great if you could implement it! Then we would be able to do validation on the fly and could also update the center part with the questions in it. What do you think how long it would take to implement? We were already on the way to implement it by ourselves in the sources but if you could provide the event that would be much better, of course.
Best Regards,
Richard
Hello Andrew,
has this feature been implemented? It would be wonderful to be able to upgrade to the newest version without having to migrate our workaround.
Kind regards,
Erik Tuneström
Hello Erik,
Unfortunately this feature is not implemented yet. We've chaned it priority and started to work on it right now.
I'll inform you about the progress immediately in this thread.
Thanks, Serge
SurveyJS Team
Hello Erik,
I've implemented the
onPropertyEditorKeyDown
event via this commit - https://github.com/surveyjs/editor/commit/9dd4b75258b7334522e7c8c68082eb1b5d77eb60Could you check the code and tell me whether it fit your tasks?
Thanks, Serge
SurveyJS Team