[Resolved] Generic select form field from repeatable field group, one-to-many relationship
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.
I need a selection field that gives as options repeatable field group items from a parent post (‘Client’) in a one-to-many relationship to the post (‘Job’) where the form will appear.
What I’m trying relies on two views queries: one to generate the list of repeatable field group items, filtered by relationship to the parent post, and the other (which I’m calling ‘container’) to relate the child post where the form is shown to the parent. This query-inside-a-query approach does output the intended filtered list when the ‘container’ view is displayed in a content template for the child post. But it does not produce a selection field successfully.
I've made the following changes and the generic field is working now.
1. The output of the view 'job contacts selection container' was adding lot of extra empty space, at the start and the end.
To fix this, I removed the '[wpv-filter-meta-html]' tag from its 'Output Editor' section and removed the line breaks and empty spaces from its 'Loop Editor' section.
2. In the form 'job set-edit form', replaced the single-quotes with the double-quotes in the view's shortcode used in the generic field's code:
Thank you, Waqar. This is instructive, very helpful. I’d had a sense that quote-marks nesting was part of my problem, but without the picture of the working parts together that you’ve provided here, my attempts in that way weren’t making a difference.
Paul Bowman confirmed that the issue was resolved on 2023-11-03 10:31:53.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.