I am confident that my view is working as I can display the correct values on the form's front end. It appears like this:
{“value”:”Lumsden School”,”label”:”Lumsden School”},{“value”:”Mossburn School”,”label”:”Mossburn School”},
I'm using the code below to get these dynamic values into the select field on the form but it just isn't working - the select menu does not appear.
Many thanks for your prompt reply. The solution looks great.
I'm not much of a coder, so could you please tell me in brief what that code snippet does? I'm going to need to add a second select field to that form so I'm guessing that I will need to modify the $id. I'm also guessing that I need to modify the filter title? Sorry for the dumb question - hooks are very new to me 🙂
I realised that instead of saving the school and address as single line fields I could use the relationship between the post types. So I went and modified the views to populate the select fields with the correct value - the select fields now have the id of the parent as the value. I'm displaying these on the CRED form and they are correct.
This form is to create an Application CPT. The Application has three parents: Students, Student locations, Schools.
When saving the application the Students parent is successfully saved, but the Student location and the School parent are not. Here's the code for one of those that isn't working:
As your original issue is resolved and as per our support policy we entertain only one question per support ticket. May I kindly ask you to open a new ticket with your each new question, this will help other users searching on the forum.