I have been working on a custom add-on for WP Job Manager where I modify, via filters, the content displayed. I’ve used many of the tutorials on www.wpjobmanager.com/documentation, but I’m stuck on one point.
I’m trying to recreate a feature from the Resumes add-on (demo here) where you can add additional education or experience fields. I am trying to recreate that feature in the main WP Job Manager plugin to populate an optional subfield for addresses.
This is a scaled down version of the code I have for now: http://pastebin.com/fAVq9vfu
I have successfully added the fields and subfields to the form (there is a separate template file that renders the form). They also register in the global $_POST variable as shown when I do a var_dump in the Preview template (sample screenshot), but I am messing up somewhere when it comes to storing the values. None of the fields with subfileds are saving in the post meta data table. I’ve tried a few options, most recently by including and having my class extend WP_Job_Manager_Forms Class (https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/class-wp-job-manager-forms.php). I believe I can accomplish what I am trying to do via the included filters, but I’m not sure which one or how to do it.
I believe I might need to call get_posted_fields() somewhere, because I’m not entirely sure it is catching my custom get_posted_{subfield}_field methods.
Does anyone have any tips?