# Using Feeds for Topic and Reply Creation

With the **Premium tier and above**, you can use Gravity Forms Feeds to automate the creation of topics and replies. This allows you to leverage powerful features like **Feed Conditional Logic** to decide when a forum post should be created.

## How it Works

When you assign a form as a Topic or Reply form in the **Forms** tab of GravityOps Forum, an "Automated Feed" is automatically created for that form (Premium tier and above).

You can then go to the **Settings > GravityOps Forum** menu of that form to:
1.  Enable/Disable the feed.
2.  Add **Conditional Logic** (e.g., only create a topic if the user selects a specific category).
3.  Adjust field mapping.

### Syncing and Takeover

- **Feed-Driven Processing:** In Premium, posting is feed-driven at submission time. Active feeds (including conditional logic) determine whether forum entities are created.
- **Assignment Sync:** Form assignments and feeds stay synchronized so the admin UI remains consistent, but runtime creation follows active feed behavior.
- **Bi-directional Deletion:** Deleting a synced feed will also remove the corresponding form assignment, and deleting a synced assignment removes its automated feed.

## Why use Feeds instead of standard assignments?

Feeds provide several advantages for advanced forum setups (Premium tier and above):

-   **Conditional Logic**: Create topics in different forums based on form input.
-   **Granular Control**: Use different feeds on the same form for different purposes.
-   **Native Experience**: Manage forum integration just like you manage other Gravity Forms Add-ons with the same familiar setup.
-   **Flexible Context**: Use a single form for multiple forums or topic types with different mapping rules for each.

## Multiple Feeds

You can create multiple GravityOps Forum feeds on a single form. This is useful if you want to create multiple topics in different forums from a single submission, or if you have complex logic that requires separate mappings.

## Customizing the "Skipped Feed" Message

If a form submission is received but the **Feed Conditional Logic** is not met, the entry will not be posted to the forum. In this case, the user will be redirected back to the forum with a notification.

You can customize this notification message using the `gofrm_skipped_feed_message` filter.

```php
/**
 * Customize the message shown when a feed is skipped due to conditional logic.
 *
 * @param string $message The default message.
 * @param array  $form    The Gravity Form object.
 * @param array  $entry   The Gravity Forms entry object.
 * @return string The filtered message.
 */
add_filter( 'gofrm_skipped_feed_message', function( $message, $form, $entry ) {
    // You can use $form['id'] or $entry values to provide context-specific messages.
    return 'Your submission was received but did not meet the criteria to be posted immediately. Our moderators will review it shortly.';
}, 10, 3 );
```

> [!IMPORTANT]
> If you create multiple feeds for the same form, **enable Feed Conditional Logic** on each feed to avoid unintended duplicate posts. The plugin will warn you when multiple feeds exist without conditional logic.
