On an edit form page of a custom post type, I have a view that generates the values for a select field. This works fine now (see https://toolset.com/forums/topic/view-as-select-not-working/ for more information). However, when I click submit to store the chosen value, it doesn't do that.
I would like to see the chosen value stored in the CPT and to show the chosen value after the save in the select field (also when I revisit this specific post).
Hello. Thank you for contacting the Toolset support.
I see with the following view you are using title as both value and label. Instead of using title as value, we need to change it to use ID.
=> hidden link
So first step is, I've change the view's loop that offers the select option where I've change the value to use ID, so we will have ID and label pairs:
=> hidden link
Just one more thing: the chosen value doesn't show after saving it (submitting the form), it always goes to the "--- not set ---" value even when it had a value to begin with.
To see this in action: just click on "Opslaan" and you will see the green message that the Workshop has been saved, but the value will be set to "--- not set ---".