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 ?
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.
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?
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
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.
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.