Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter totallytech

    (@totallytech)

    Hmmm, ok – I just opened my admin site in IE and the publish worked… It didnt work in Chrome though….

    Is there a way to add a small form at the end of the site, where you have Your name, for the scores, – I would like to ask people how they found the site, at the moment its a question, but its not really that clean so it would be nicer with a little form you can customise for the person completing the quiz!

    Plugin Author jewlofthelotus

    (@jewlofthelotus)

    @totallytech Not sure why your 11th question was having issues. That is very strange, but glad you got it working ultimately.

    There is currently no built in way to add a form at the end of the quiz, but I am looking at making it possible to use shortcodes within the quiz fields. That would allow you to use some other form plugin with in an area like the results section.

    Thread Starter totallytech

    (@totallytech)

    That would be excellent, I did email you the other day actually to see if you could point me in the right direction with some code trouble I was having.

    Thread Starter totallytech

    (@totallytech)

    Hey, I’ve managed to get my code inserting extra fields in the Database (Such as how did you find my site) etc.

    I’ve checked over the code for the hiding of the fields when you click start, however this isnt working…

    var nameLabel = $("#slickQuiz' . $quiz->id . ' .nameLabel input");
                                        var emailLabel = $("#slickQuiz' . $quiz->id . ' .emailLabel input");
    
                                        // when starting quiz, hide name field
                                        $("#slickQuiz' . $quiz->id . ' .button.startQuiz").on("click", function(e) {
                                            var start = $(this);
    
                                            if (start.hasClass("disabled")) {
                                                e.stopPropagation();
                                            } else {
                                                nameLabel.parent().hide();
                                                emailLabel.parent().hide();
                                                start.hide();
                                            }
                                        });

    I’ve also seen the code to ensure that name and email is filled out, however for some reason it allows my visitors to leave the fields empty and the start button is always appearing even when fields are empty. Any ideas?

    // disable the start button
                                            button' . $quiz->id . '.addClass("disabled");
    
                                            // when name is entered, enable start button
                                            $("#slickQuiz' . $quiz->id . '").on("change keyup", ".nameLabel input, .emailLabel input",  function() {
                                                var namePass = nameLabel.val() !== "";
                                                var emailPass = true;
    
                                                if (emailLabel.length > 0) {
                                                  emailPass = false;
                                                  emailPass = emailLabel.val() !== "";
                                                  emailPass = /\S+@\S+\.\S+/.test(emailLabel.val());
                                                }
    
                                                if (namePass && emailPass) {
                                                    button' . $quiz->id . '.removeClass("disabled");
                                                } else {
                                                    button' . $quiz->id . '.addClass("disabled");
                                                }
                                            });'
    Thread Starter totallytech

    (@totallytech)

    Oh man, its working now – I just realised I didn’t have the start button active!

    Is there a way to get the description text to hide when the name etc all hide?

    Plugin Author jewlofthelotus

    (@jewlofthelotus)

    @totallytech Glad to hear you got it working. There isn’t currently a way to hide the description when the quiz starts, but that’s a reasonable option to add to the settings. I’ll make a todo for myself.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Odd trouble, not saving the question 11’ is closed to new replies.