• Resolved max143

    (@max143)


    I have error in form validation. But there are no info about what errors. How I can edit this validation? Where is settings of this validation?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Glad to help. I will assume that you are referring to client-side validation, which is made possible using Parsley.js. Currently it is not possible to use a customized Parsley script, but I would be glad to add a way to do so in the next plugin update. Thank you for the feedback, feel free to post again if I may provide any further information.

    Thread Starter max143

    (@max143)

    In form template there is such code
    <?php if (isset($_GET['submission-error']) && $_GET['submission-error'] == '1') { ?>
    When form send $_GET['submission-error'] = 1 ?

    Plugin Author Jeff Starr

    (@specialk)

    Ah, you are referring to server-side validation, not client-side validation. Thanks for clarifying. I am not finding that particular code anywhere.. can you let me know where you are seeing it?

    Thread Starter max143

    (@max143)

    I am not sure, that it is default code, I am only edit site, not developing from the beginning, but I find this code in views/submission-form.php. And I think that $_GET['submission-error'] is from USP, not user variable.

    Plugin Author Jeff Starr

    (@specialk)

    Hmm that’s weird because there is no such code in the file, views/submission-form.php. So maybe you are using an old version of the plugin?

    Thread Starter max143

    (@max143)

    maybe, but I think there is must be form template also in a new version?

    Plugin Author Jeff Starr

    (@specialk)

    There is, but like I said it doesn’t include the code you mention. I tried searching the file for “submission-error” and no results, so that means $_GET['submission-error'] is not included anywhere in the file.

    Thread Starter max143

    (@max143)

    oh, ok, now I understand you. topic closed

    Plugin Author Jeff Starr

    (@specialk)

    Not sure if this helps, but you can customize the error message by filtering usp_error_message. That hook is located in the main plugin file, around line 1342.

    Thread Starter max143

    (@max143)

    And what is the name of this main plugin file?
    And one more question, from what file returns all data? How I can find this stranger $_GET['submission-error']? In <form action=""> there is empty action, and I dont know where it is processing.

    Plugin Author Jeff Starr

    (@specialk)

    Glad to help:

    1) “And what is the name of this main plugin file?”

    It is user-submitted-posts.php, located in the plugin root directory.

    2) “And one more question, from what file returns all data? How I can find this stranger $_GET[‘submission-error’]? In <form action=””> there is empty action, and I dont know where it is processing.”

    Processing begins with usp_checkForPublicSubmission(), also in the main plugin file.

    Thread Starter max143

    (@max143)

    Thank you. It helps!

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

The topic ‘Validation error’ is closed to new replies.