I am building a website where logged in custom users create a CPT 'Tour' with a first CRED create post form, then come back later to edit this post with added details in another CRED edit post form.
This edit post form works, the added information is registered, and the status of the post is updated on form submit ... but it is only possible to submit the edit form once. If I reopen the edit post form a second time, the button submit is not triggering anything. As far as I know, I don't see anything in the JS console either. I tried with the post being in different status (from draft to published), it doesn't make any difference.
I would like users to be able to edit their post several times with the same edit post form.
Link to a page where the issue can be seen: hidden link
Do you have any idea what might cause this ?
Thanks for any hints,
Yann
Dear Yann,
I have tried it in your website by below steps:
1) Login your website with username "Toolset"
2) Open URL you mentioned above,
3) click the button "SUBMIT", I see below JS error in my Chrome browser console window:
An invalid form control with name='wpcf-points-gps-bivouacs' is not focusable.
An invalid form control with name='wpcf-trace-parcours' is not focusable.
Is it the same problem you mentioned above? can you confirm it?
If it is, it is abnormal, please check these:
1) deactivate other plugins and switch to wordpress default theme, and test again
2) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, also point out the problem page URL, I need to test and debug it in my localhost, thanks
Dear Luo Yang,
Thank you for you reply and for pointing out the 2 fields causing the issue. I didn't see that error message in FF console, but I'm not really sure how the JS console is working.
Anyway, these two fields are for the logged-in user to upload 2 files (usually a .txt file of GPS points), and they are required fields.
First time the files are uploaded, it works. But if I edit the form a second time without re-uploading files, that's when it bugs. If I re-upload files (even same ones), it also works as it should.
These two fields are required in my CPT. I tried to set these 2 fields as non-required and the problem doesn't persist. So somehow, the issue arises when the form is submitted without new files upload in these required fields, even if there are already existing files.
I tried changing to twentyseventeen theme, and I also tried to deactivate all plugins but the Toolset suite, but the problem still persists.
Let me know what you think. If it's a bug in Toolset, then for me I can leave these fields non-required for a while.
Best,
Yann
Thanks for the details, I am downloading the file, will feedback if there is anything found
Thanks for the details, it is a known issue, please try the errata here:
https://toolset.com/errata/required-image-fields-cred-form-will-appear-not-set-re-upload-new-image/
And feedback if the problem is fixed or not. thanks
Dear Luo Yang,
Yes, this fixed the issue. Thank you very much !
Best,
Yann