Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Dung,
I can understand the frustration. However given the limited option where an API doesn't exist for this my hands are tied.
In order to track down what is wrong I will need a copy of the site so that I can do some basic debugging of the function to see what data is being passed.
Would it be possible to get a copy of the site using the instructions below ? I've enabled the private fields for your next response.
https://toolset.com/faq/provide-supporters-copy-site/
Thanks,
Shane
Hi Shane,
I created the files with the duplicator plugin but only see an "upload an image" button here which doesn't work for uploading the files. Does your response mean that there is no way to make the fields required and give inline entry errors on the standard post form in Toolset?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Dung,
I've enabled the private fields so that you can provide me with the duplicator package. You can upload it to Google Drive and provide me the share link.
Does your response mean that there is no way to make the fields required and give inline entry errors on the standard post form in Toolset?
That is correct there isn't a way to make the checkboxes fields required with our Forms and have an inline response. However there is a validation hook that can be used to check if the field is being submitted empty and fail the form from submitting.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate
We can use this to check the value data being submitted in the checkbox and if the array is empty then we can fail the form. This is a way we can get the validation on the field and make it required.
Please let me know if this will work for you.
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Dung,
After doing some debugging on the code I wasn't able to get it to work. Unfortunately given that it is custom code I cannot take it further from there.
Our only option now is to see how best we can get the custom validation working for the Toolset form. If you need any assistance with setting up the custom validation please let me know.
Thanks,
Shane
I was able to get this sort of working with the hooks but it is not a good end-user experience to have multiple types of form errors. Please prioritize making the post form more user-friendly by allowing required fields and inline errors. People have been requesting that feature for years.