I have a Pro Form Select field with it’s input set to an ACF field group returning the Post name and ID. This is all fine.
On a Update Post form, if I select multiple values from the Select Dropdown, after submitting the form and checking the back-end, these selections are showing up. However, if I refresh the page or load the page again against the same post, I get no indication that relationships have been selected previously.
How do I go about this?
Regards
Pete
p.s. the first image is the input side of things showing how it is configured, and the second image is the submit config.
I’m not sure you can use the “value” area in the select element to populate a multiple select because the value field only accepts a single value, and you need an array in this case.
It is a similar scenario to the checkbox field.
So, I suggest you use dynamic data for the populate option instead of Nestable. You can ask ChatGPT to help you with the query or use the Dynamic Shortcodes plugin.
But a select can accept multiple selections.
As I said, it does update multiple entries, but after refresh, where other fields show the value from the post, the select needs to have the selection from the cpt and reselect those options.
This is why I’m trying to emulate how ACF shows relationships on the wordpress backend.
I think this will be the simplest way to show both the available selections and the already selected options.
It seems I’m not good at explaining. When you have a form field that accepts multiple selection (array), you cannot add the existing values using the value input area.
If you’re going for the Nestable populate option, then you need to use the “Conditionally selected if checkbox contains array” in the nested Checkbox element.
Or you populate the options using the Dynamic Data
See the output:
1 Like
OK, I undeerstand now. I’m not sure we should have to deal with this, even if we can, other tools I’ve used manage this but the flexibility of BF makes it not so easy provide a solution. I now need to find a way of getting the relationship array returned so that I can process it myself.
Thanks
Pete
Are you using the Nestable (query loop) to display all the posts from the related CPT?