Skip Navigation

[Resolved] Gravity Form checkboxes saving to custom field checkboxes

This support ticket is created 3 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 19 replies, has 3 voices.

Last updated by Purchasing WCER 3 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#2097027

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

#2097101

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?

#2097239

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

#2098395

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

#2102177

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.