--- phase: 03-job-management-core plan: 01 type: execute depends_on: [] files_modified: [includes/class-formidable.php] --- Create Formidable Forms job submission form that creates job_offer posts with pending status. Purpose: Enable providers to submit job listings through a frontend form. All submissions go to pending status for admin approval (core value: moderation before publication). Output: Functional job submission form accessible to logged-in providers, creating job_offer posts with ACF fields populated. ~/.claude/get-shit-done/workflows/execute-plan.md ~/.claude/get-shit-done/templates/summary.md @.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/01-foundation-setup/01-03-SUMMARY.md @.planning/phases/02-provider-registration-auth/02-01-SUMMARY.md @includes/class-formidable.php @includes/class-acf-fields.php @includes/class-post-types.php **Tech stack available:** Formidable Forms Pro (with Post Creation), ACF Pro, job_offer CPT **Established patterns:** Programmatic Formidable form creation (from 02-01) **Constraining decisions:** - Jobs must submit to pending status (Phase 01-03) - German labels for all form fields (PROJECT.md) - ACF fields: job_location, job_type, job_deadline, job_contact_email, job_logo (Phase 01-03) - Form key pattern for easy retrieval (established in 02-01) Task 1: Create Formidable job submission form with ACF field mapping includes/class-formidable.php Add `create_job_submission_form()` method to DDHH_JM_Formidable class. Programmatically create Formidable form with key 'job_submission' containing: **Form Fields (all German labels):** 1. job_title (text, required) - "Stellentitel" 2. job_description (textarea, required) - "Stellenbeschreibung" 3. job_location (text, required) - "Standort" 4. job_type (select, required) - "Art" with choices: Vollzeit, Teilzeit, Ehrenamt 5. job_deadline (date, optional) - "Bewerbungsfrist" (format: d.m.Y) 6. job_contact_email (email, required) - "Kontakt-E-Mail" 7. job_logo (file upload, optional) - "Logo" (accept: image/jpeg, image/png, max: 2MB) **Form Actions:** - Create Post action configured to: - Post type: 'job_offer' - Post status: 'pending' (CRITICAL - enforces admin approval) - Post title: mapped to job_title field - Post content: mapped to job_description field - Post author: current logged-in user (providers own their jobs) - Custom field mappings to ACF fields: - job_location → meta:job_location - job_type → meta:job_type - job_deadline → meta:job_deadline - job_contact_email → meta:job_contact_email - job_logo → meta:job_logo (as attachment ID) **Form Settings:** - Submit button text: "Stellenangebot einreichen" - Success message: "Ihr Stellenangebot wurde zur Prüfung eingereicht!" - Success action: Redirect to provider dashboard (/anbieter-dashboard/) - Form description: "Alle Felder mit * sind Pflichtfelder. Ihr Angebot wird vor Veröffentlichung geprüft." Add `get_job_submission_form_id()` helper method similar to `get_registration_form_id()`. Hook form creation into existing `setup_registration_hooks()` or create separate `setup_job_forms_hooks()` if cleaner. AVOID creating duplicate forms - check if form with key 'job_submission' exists before creating. WHY: Prevents multiple identical forms in Formidable admin on plugin re-activation. 1. Check form exists: In WP-Admin → Formidable → Forms, verify form titled "Stellenangebot einreichen" exists 2. Check field count: Form should have 7 fields total 3. Check form action: Form should have "Create Post" action set to post_type='job_offer', status='pending' 4. PHP syntax: php -l includes/class-formidable.php (no errors) - Formidable form created programmatically with key 'job_submission' - All 7 fields present with German labels - Create Post action configured with pending status - ACF field mappings complete - No PHP syntax errors Task 2: Add form to provider dashboard with access control templates/provider-dashboard.php Add job submission form to provider dashboard template above the job listings table. **Structure:** ```php

Neues Stellenangebot erstellen

Formular konnte nicht geladen werden.

'; } ?>

Meine Stellenangebote

``` **Styling (add to existing