Populate select options with values from structure field

Check out this post for a custom field that queries a structure field.