B
B
big_hasan2019-08-01 21:49:43
CMS
big_hasan, 2019-08-01 21:49:43

Polls in 1C-Bitrix: is it possible to make a “conditional question” (branching / interruption), after which the survey will end or “jump”?

I figured out how to create and add a poll to the page through the admin panel. You need to create a question so that on a certain answer of which the poll will be interrupted and a message like "Survey completed! Thank you for participating in our survey" is displayed.
Ideally, you need to do this through the admin panel, but if there is no other way, then you will have to climb into the code, it's okay - the main thing is that it can be done quickly. Kick, please, in the right direction, where to dig ..

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
Yaroslav Alexandrov, 2019-08-02
@big_hasan

I see two ways to solve your problem:
1) Expand the capabilities of the regular polling component using result_modifire.php where and add your own logic if possible.
2) Either you decide to develop your own component
+ most likely you will have to make a module for the admin part

U
Undo Redo, 2019-06-03
@derek2

I don't understand you very well, because an array, by definition, is a collection of elements of the same type. And how the array suddenly began to include both strings and numbers is not clear, but, nevertheless, I will leave the answer below (MB will help)
There is a method called delete_at...
Try to run an array of all your values ​​\u200b\u200bthrough this function, it should help.
Example:

a = [10, 12, 14, 16, 18]
a.delete_at(3) # Возвращает 16.
# а равно [10, 12, 14, 18]
a.delete_at(9) # Возвращает nil {вне диапазона).

F
fapchat, 2021-10-28
@fapchat

You just check each element of the array with a for loop and a method to check accordingly, if the element is a string, then delete

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question