fix: correct TEC shortcode format for event editing form population
- Update includes/class-hvac-shortcodes.php:277 to use [tribe_community_events view="submission_form"] - Update templates/page-manage-event.php:83 to use correct TEC shortcode format - Fixes issue where event edit forms appeared blank instead of populated with existing data - TEC submission_form view automatically detects event_id URL parameters for editing - Enables proper event creation and editing functionality for trainers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
98cbe83813
commit
71d25e2023
2 changed files with 5 additions and 4 deletions
|
|
@ -272,8 +272,9 @@ class HVAC_Shortcodes {
|
||||||
return '<p>' . __('Event management requires The Events Calendar Community Events add-on.', 'hvac-community-events') . '</p>';
|
return '<p>' . __('Event management requires The Events Calendar Community Events add-on.', 'hvac-community-events') . '</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the tribe shortcode
|
// Return the tribe shortcode with view parameter for submission form
|
||||||
return '[tribe_community_events]';
|
// This enables both new event creation and existing event editing
|
||||||
|
return '[tribe_community_events view="submission_form"]';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,8 @@ get_header();
|
||||||
echo do_shortcode($raw_content);
|
echo do_shortcode($raw_content);
|
||||||
endwhile;
|
endwhile;
|
||||||
else:
|
else:
|
||||||
// Fallback - show the shortcode directly
|
// Fallback - show the shortcode directly with submission form view
|
||||||
echo do_shortcode('[tribe_community_events]');
|
echo do_shortcode('[tribe_community_events view="submission_form"]');
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue