A client website I am working on has a job application form built using Gravity Forms. This form is displayed only on a WordPress custom post type called 'careers'.
The form has a dropdown list of all currently available careers, which when selected changes the form options using conditional logic.
Rather than someone having to manually edit this dropdown list, my client would like it to be pre-populated from all currently published 'careers' custom posts on the site. They would also like an item in the dropdown to be pre-selected, so that the selection matches the careers custom post title the form is currently being displayed on.
I have just implemented the following for the first requirement and it works great:
How would I extend this function to pre-select an option from the dropdown that matches the current custom post title?
Thanks in advance!