Skip to content

Conversation

@davidperezgar
Copy link
Contributor

Description

This PR fixes the missing "Resend Entry" button in the Gravity Forms Entries detail view. The button was not displaying properly due to incorrect form handling logic. Additionally, this PR improves security by implementing proper nonce verification and enhances the overall user experience.

Fixes #145

Changes

  • Fixed missing Resend button: The button now properly displays in the Gravity Forms Entries view when active feeds are available
  • Improved security: Added proper nonce verification using wp_verify_nonce() with entry-specific nonce names
  • Enhanced form handling: Refactored the form submission logic to use proper POST method with hidden input fields instead of JavaScript-based approach
  • Better output sanitization: Replaced wp_kses_post() with wp_kses() with explicit allowed HTML tags for better security
  • Improved user feedback: Added message when no active feeds are found for the form
  • Code structure improvements: Separated the form display logic from the processing logic for better maintainability
  • Updated changelog: Added entry for this fix in the readme.txt file

Benefits

  • Reliability: Users can now reliably resend entries to CRM from the Gravity Forms Entries view
  • Security: Proper nonce verification prevents CSRF attacks
  • User Experience: Clear feedback when no active feeds are available
  • Code Quality: Better structured code that follows WordPress security best practices
  • Maintainability: Cleaner separation of concerns between display and processing logic

Testing Instructions

  1. Navigate to Gravity Forms Entries:

    • Go to Forms > Entries in WordPress admin
    • Click on any entry to view its details
  2. Verify Resend Button Display:

    • Look for the "Resend Entry to CRM" meta box in the sidebar
    • Verify that the "Resend Entry" button is visible when active feeds exist
    • Verify that a message appears when no active feeds are found
  3. Test Resend Functionality:

    • Click the "Resend Entry" button
    • Verify that feeds are processed and a success message appears
    • Check that the entry is successfully sent to the configured CRM
  4. Test Security:

    • Verify that the form includes a nonce field
    • Attempt to submit the form without the nonce (should fail)
    • Verify that only valid nonces are accepted
  5. Test Edge Cases:

    • Test with entries that have no active feeds configured
    • Test with entries that have multiple active feeds
    • Verify that inactive feeds are not shown in the list

Checklist

  • Code follows WordPress Coding Standards
  • Self-reviewed the code
  • Added necessary comments
  • No new linter errors
  • Security improvements implemented (nonce verification)
  • Output properly sanitized
  • Changelog updated

cursoragent and others added 6 commits January 14, 2026 16:22
The resend button was relying on an external #action element that may not
exist in newer Gravity Forms versions. Fixed by:

- Adding a dedicated form with its own action field for resend functionality
- Implementing proper WordPress nonce verification for security
- Showing a message when no active feeds are available
- Improving HTML output with explicit wp_kses allowed tags

Fixes #145

Co-authored-by: david <david@closemarketing.es>
@davidperezgar davidperezgar merged commit 4ac7a95 into trunk Jan 20, 2026
6 checks passed
@davidperezgar davidperezgar deleted the feature/145-resend-button-gravity-forms branch January 20, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resend button missing in Gravity Forms Entries view

3 participants