Crocoblock / suggestions

The suggestions for CrocoBlock project
191 stars 78 forks source link

JetFormBuilder - Add alternative filter for `jet-engine-extend-form-actions/config` #7476

Closed ghost closed 2 months ago

ghost commented 2 months ago

With the filter jet-engine-extend-form-actions/config you can do many useful things, such as merging several fields into one value or applying certain fields to things that are still not natively possible. If you have added an insert post submit action in the JetForm, there is no field where you can set the post slug (post_name).

This is automatically derived from the title field. But in my case I need exactly that, that the user has a separate field for it. With the legacy JetEngine forms version this was possible with the following filter. Can you please add this for the JetFormBuilder as well?

add_filter( 'jet-engine-extend-form-actions/config', function() {
    return [
        /* form ID */ => [
            'post-slug-field' => [
                'prop' => 'post_data',
                'key' => 'post_name'
            ]
        ]
    ];
} );

Thank you in advance! :)

Best regards Edgar