[Gelöst] Using relationship data as a conditional group field in a form
This support ticket is created vor 1 Jahr, 11 Monaten. 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.
Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.
Conditional display groups in a form are JavaScript based and can change visibility depending on selections made in the form. There is no possibility to use these based upon data from related posts.
But maybe conditional shortcodes would meet your needs? They would conditionally output some content at the time the form is rendered (which could include only adding some fields to the form based upon the condition being met).
To use those you would need to the advanced form editor (i.e. edit the markup and shortcodes directly), where you could insert wpv-conditional shortcodes that checked values from related posts.
Note, though, that there can only be a single related post, e.g. it would work for a form publishing child posts that referenced a field from the parent (there can be only one parent), but not for a form publishing parent posts that referenced a field from a child post (because there can be many child posts, so which one should it reference?).
In the former case your wpv-conditional shortcode can test the output of a shortcode which outputs the desired field (e.g. a types shortcode), adding the item attribute to specify that the origin post is a related parent.
Here's an example of the format used to output a field "status" from the parent of a project-tasks relationship:
Instead to make it simpler, I added a radio button field with 2 options but it doesn't seem to work for the edit forms (image attached) it's not showing any of the fields when I put them inside the conditional group.
These have been tagged with 'Standard' Radio button versteckter Link versteckter Link versteckter Link
This has been tagged with 'Edinburgh' radio button versteckter Link
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.