• Resolved Julian M

    (@caesarby)


    Hello.

    Thanks for your plugin. Tell me please, do you have any event handler for the “submit” form action?

    I’d like update user profile if he filled the quiz, but i did not found any hooks in the documentation and in the source code too:(

    Is it possible? what could you advise for me?

    Thanks in advance.

    https://ww.wp.xz.cn/plugins/quiz-master-next/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Greetings caesarby:

    Thank you for choosing to use this plugin. I am working to build out the developer documentation but haven’t had a chance to get all the hooks/filters documented yet. The results page has filters after every step of the process and can be seen here: https://github.com/fpcorso/quiz_master_next/blob/master/php/qmn_quiz.php#L629

    The filters pass an array that has all the results gathered to that point. However, it does appear that I do need to add in some hooks in there for times you do not want a filter. I’ll get some added in the next update but you can definitely use the filters for now as long as you return the content.

    Thread Starter Julian M

    (@caesarby)

    Hello Frank,

    Thanks for your answer. It make sense.
    I guess for my aims I can just use the checking (if $_POST is not empty) in the “single.php” file =) It is not so elegant, but still.

    But usage of filter helped me. It looks better. I’ve added
    add_filter('qmn_after_check_answers', 'quiz_after_check_answers', 10, 3);
    in my code.

    Anyway i will waiting for updates.

    P.S.
    Yet one thing about code style) You’ve mixed tabs and spaces sometimes. (sorry! i am a bit nerd)
    e.g. You have in the function “display_begin_section()” a lot of spaces rather tabs.

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

The topic ‘Event handler for "submit"’ is closed to new replies.