-
Notifications
You must be signed in to change notification settings - Fork 392
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
Ability to trigger the adding of a survey question via an external element #378
Comments
@leksinteractive There are two ways of doing it.
Thank you, |
Thanks for the quick reply @andrewtelnov. Yeah I saw the toolbox customization example, but in my case I don't deal with the toolbox at all. Basically I need a way to trigger an event to add the question to the survey itself (not the toolbox), so triggered from an external element totally independent of any surveyjs elements. Something like this would be ideal:
Hope that makes sense. |
@leksinteractive you may use onQuestionAdded event. Thank you, |
@leksinteractive To add a new text question, you may use the following code: Thank you, |
Awesome, thanks @andrewtelnov, that's what I was after 👍 |
* Resolved #378 - Improving page placeholders * Work for surveyjs/private-tasks#378 - react component and placeholder styles refactoring * Work for surveyjs/private-tasks#378 - finished react component and implemented placeholder for ko * Work for surveyjs/private-tasks#378 - implemented tab placeholders in Vue * Work for surveyjs/private-tasks#378 - implemented tab placeholders in Angular * Updated etalons * Update etalons * Update etalons * Updated v-test * Fixed placeholder texts * Fixed Mike remarks * Fixed placeholder title tests * Fixed placeholder paddings * Updated etalons * Updated etalon * Updated etalons * Updated etalons * Fixed react vr-tests * Try to fix vr-tests * Fixed vr-tests in ko --------- Co-authored-by: tsv2013 <[email protected]>
Are you requesting a feature, reporting a bug or ask a question?
Question to see if there's a way to do this currently, or if there are plans to implement something like it in the future.
At the moment when building a survey the toolbox seems to be the only way to add a question to the svd_questions_editor panel. I have a requirement to trigger the addition of a question from an external custom element.
To be more specific I have a custom form which should contain a standard select dropdown with a few different question types. When the user selects a question type this will trigger the addition of that question type to the survey editor which is also part of the original form (but with the toolbox hidden in this case)
I couldn't find anything in the documentation along these lines, but maybe I missed it.
Thanks,
Aleks
The text was updated successfully, but these errors were encountered: