Skip Navigation

[Resolved] Conditional Custom Fields not Working

This thread is resolved. Here is a description of the problem and solution.

Problem: I have an RFG that contains fields with conditional display based on other fields in the parent post, but the conditionals don't appear to be working correctly.

Solution: Update to the latest versions of Types and Views to get the fix for this issue.

This support ticket is created 4 years, 8 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 22 replies, has 2 voices.

Last updated by deepS 4 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#1298817

Hi, I am trying to create conditional custom fields in a particular post type, but things are not happening the way it should.
I have gone through this https://toolset.com/errata/data-dependent-fields-based-on-other-custom-field-values-are-not-hidden-shown-correctly-in-the-classic-editor/
But don't know whether it's affecting my case too?

I have two custom fields in RFG- 'Pay Scale' and 'Salary' which I want to show conditionally based upon a radio button custom field (Non-RFG). How to handle the issue (At the moment it won't be possible for me to use block editor)?

Thanks.

#1298845
#1301215

Hi, I have updated the Toolset Types to the new version 3.3.3 where it has been mentioned that "Fixed an issue where data-dependent field display conditions didn’t work properly in the “Per Post” editor mode when using the classic editor."
I thought the problem has been fixed but I am still facing the same issue with conditional display of custom fields. Please help me out of the situation.

#1302301

Hi, sorry if there was a misunderstanding here. I can see that there is still one pending issue related to conditional field display in Repeatable Field Groups. The issue that was resolved in the last release was not exactly the same issue you have experienced, so we are still waiting on a release date for that issue.

#1309857

Hi, I am addressing the same old issue. But in a recent update of Types 3.3.4, it has been clearly written: "Fixed: Field display conditions not working properly in repeatable field groups."

I updated the plugin but I think I am still facing the same problem till now.

So, anything else to resolve the issue?

#1309873

Hi, there were some issues with conditional field display in RFGs resolved in the last release. Is it possible for me to log in again and check? The login credentials I have now are no longer working.

#1309919
#1309941

It seems like changing the radio buttons works as expected now, but the display isn't quite right on the first page load. If you resave a post to set the correct field values, does the conditional display work as expected when you refresh the post editor screen?

#1309943

Have you checked pay option radio button with fields like Salary and Pay scale?

#1309949

I did check by changing the Pay Option radio field. It seems to update the RFG field display as expected, based on the conditional logic. However, when the page first loads, the conditional display of those RFG fields is not correct. I'm curious to see if resaving the post fixes that issue, but when I try to resave I see errors because some other unrelated required fields are not set yet. So I'm not able to test completely and I was hoping you could take a look at that part.

Or if I'm misunderstanding the conditional logic and changing the Pay Option radio field isn't working as expected, please tell me more details.

#1310897

Sorry for the delayed reply. I couldn't understand your point. Let me clarify things.

See in a custom field group for jobs, I have a radio button named 'Pay Option' with three options- Salary, Pay-scale and none. Now in the Repeatable Field Groups there are two fields named as 'Salary' and 'Pay-scale'.

What I want is to show either 'Salary' Field or 'Pay-Scale' Field or None when the respective option is selected from the radio button field I mentioned. Hope you got my point.

Thanks.

#1311347
1.png
2.png
3.png
4.png

I think I understand your point, let me try to clarify. I am talking about the conditional display of the input fields in the post editor screen for this job post: hidden link

When the page first loads, the RFG input fields are not displayed correctly based on the Pay Option selected. After I change the Pay Option field, the RFG fields are shown correctly. I am attaching screenshots here to show what I mean.
1. On page load, the RFG fields are not displayed correctly.
2. If I change the Pay Option field, the RFG fields are displayed correctly.
3. If I change it again, the RFG fields are displayed correctly.
4. If I change it back to the original option, the RFG fields are displayed correctly.

My point is I would like for you to update this post in wp-admin. I would like to see if that fixes problem 1 in my comments above. I cannot update the post because several required fields are missing, and I do not know what should be in those fields. After the post is updated, we should test again.

#1311609

I got your point and have gone through the situation. But as you have said "On page load, the RFG fields are not displayed correctly"- is there any way to solve the issue? If not please inform the technical team to fix the issue as early as possible.

Thanks.

#1311611

is there any way to solve the issue?
Again, I ask you to update the post in wp-admin. I would like to know if updating the post solves the problem.
hidden link

I cannot update it because some required fields are empty. Please update the post in wp-admin.

#1311947

Hi, I have tested and found there is some bug in the plugin. As I am trying to put the figures in the Salary field of RFG it's not saving up the data as and when I update the post. It returns back to the same old state (i.e. empty field).

Have a look at this: hidden link
You put some figures and see what happens. Thanks.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.