For Block 1, use JS to add the Submit button and when it is clicked set an embedded data field and click the Next button. After Block 1 add survey flow branch based on the value of the embedded field.
For Block 2, use JS to add the Submit button and when it is clicked click the the Next Button.
@TomG will it be something like this?
// Add a submit button
var submitButton = document.createElement("button");
submitButton.type = "button";
submitButton.innerText = "Submit";
submitButton.id = "submitButton";
document.getElementById("NextButton").parentNode.insertBefore(submitButton, document.getElementById("NextButton"));
// Add click event listener to submit button
submitButton.addEventListener("click", function() {
// Set embedded data field value
Qualtrics.SurveyEngine.setEmbeddedData("your_embedded_data_field_name", "submitted");
// Click next button
document.getElementById("NextButton").click();
});
In block 1 I want the respondent to click a button that says submit or one that says continue to next section
Yes, something like that. You need to put it inside the addOnReady function.