Skip Navigation

[Resolved] Form stopped working when Types updated to 3.2.1

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

Problem: I have a Form that uses conditionals based on the value of a generic field. That field is set using the cred_post_parent shortcode, but it's not working after updating to Types 3.2.1.

Solution: Instead of setting the value based on cred_post_parent, use the wpv-search-term shortcode to directly access the parent post URL parameter.

[cred-generic-field field="_wpcf_belongs_company-profile_id" type="hidden" class=""]
{
"required":1,
"validate_format":0,
"persist":1,
"default":"[wpv-search-term param='parent_company-profile_id']"
}
[/cred-generic-field]

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-search-term

This support ticket is created 5 years, 3 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)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by peterv-6 5 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1163813

I have just updated to the latest version of Types and a form no longer appears.

The form [cred_form form="New Company Announcement"] should appear on this page:... hidden link

Immediately before updating types the form appeared. Now it does not.

NOTE need to be logged in to the site.

#1163835
Capture.PNG

Here is what should be seen:

#1164104

Hi, based on your debug information it looks like Types was the only plugin updated to the latest version. Please update all Toolset plugins to the latest versions and test again. If the problem is not resolved, temporarily switch to a default theme like Twenty Seventeen, then deactivate all non-Toolset plugins and test again. Let me know the results of those tests and we can go from there.

#1164154

Christian

I did all of that and no change. and tested after updating the toolset plugins, after the theme change and again after deactivating all the other plugins.

Can you please have a look at the problem now?

Cheers

Peter

#1164846

Okay thanks, I see the issue here. There is conditional code in the Form based on the value of a generic field, which has the same slug as the legacy relationship system meta slug. That value was set with a deprecated shortcode cred_post_parent. I modified that code to point directly to the correct URL parameter parent_company-profile_id:

[cred-generic-field field="_wpcf_belongs_company-profile_id" type="hidden" class=""]
{
"required":1,
"validate_format":0,
"persist":1,
"default":"[wpv-search-term param='parent_company-profile_id']"
}
[/cred-generic-field]

Please test now and let me know if the problem is not completely resolved. Note that if you choose to migrate to the new Post Relationships system, it may be necessary to regenerate the code for this Form.

#1165088

My issue is resolved now. Thank you!

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