agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq,
agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq ,
dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu
http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan
BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama
Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga
BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai
Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah
Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai
Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs
Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games
Comments
Hi @b_lanzini,
To achieve what you're after, I'd move away from the already-made form_multiple_choice object amd use straight HTM and javascript code inside an inline_html object.
Let's imagine that these are your MCQs:
I'd use this structure:
And code like this inside the inline_html object:
<form id="myForm"> <p id="question"></p> <div id="optionsContainer"></div> <br> <!-- The submit input (OK button) will be named based on vars.QuestionID --> <input type="submit" value="OK" id="okButton" disabled> </form> <script> (function() { // Populate the question text from vars.question document.getElementById('question').textContent = vars.question; // Set the OK button's name attribute to the QuestionID value document.getElementById('okButton').setAttribute('name', vars.QuestionID); // Array of option variable names to loop over const optionNames = ['optionA', 'optionB', 'optionC', 'optionD']; const optionsContainer = document.getElementById('optionsContainer'); // Loop through each option variable and create a checkbox input with a label optionNames.forEach(function(optionName) { // Create a label element for styling and grouping const label = document.createElement('label'); // Create the checkbox input element const checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.name = 'option'; // Set the checkbox value from the corresponding OSWeb variable value checkbox.value = vars[optionName]; // Append the checkbox to the label label.appendChild(checkbox); // Create a text node that displays the option text const textNode = document.createTextNode(' ' + vars[optionName]); label.appendChild(textNode); // Optionally, add some spacing between options label.style.marginRight = "10px"; // Append the completed label to the container optionsContainer.appendChild(label); }); // Function to update the OK button state based on checkbox selection function updateButtonState() { const checkboxes = document.querySelectorAll('input[name="option"]'); const okButton = document.getElementById('okButton'); const anyChecked = Array.from(checkboxes).some(checkbox => checkbox.checked); okButton.disabled = !anyChecked; } // Attach event listeners to all checkboxes to check if one is selected document.querySelectorAll('input[name="option"]').forEach(checkbox => { checkbox.addEventListener('change', updateButtonState); }); // Optional safeguard: Prevent submission if no option is selected (should not occur due to button state) document.getElementById('myForm').addEventListener('submit', function(event) { const checkboxes = document.querySelectorAll('input[name="option"]'); const anyChecked = Array.from(checkboxes).some(checkbox => checkbox.checked); if (!anyChecked) { event.preventDefault(); } // Otherwise, form submission occurs and OSWeb logs the response using the input's name attribute. }); })(); </script>Note that the code ensures that the data are logged. The response is logged in a variable called "option" in the output log. There's also a QuestionID variable to help you identify each specific trial.
The OK button will only be available if a response option is selected.
Hopefully this helps, You'd have to adapt the code to match the look you want in your task, but the principle should work.
Kind regards,
Fabrice.
Thanks @Fab ! This was extremely helpful :)