Skip to content

Instantly share code, notes, and snippets.

@cpaul007
cpaul007 / ff-reset-button.php
Created May 5, 2020 06:37
Add the reset button into the Fluent Forms
<?php //* do not inlcude this line
add_filter( 'fluenform_rendering_field_html_button', 'paulc_add_reset_button', 99, 3 );
function paulc_add_reset_button( $html, $data, $form ) {
//* You will replace the form ID 2 with your form ID
if( $form->id == 2 ) {
$reset_btn = '<button class="reset-button ff-btn ff-btn-md" type="reset">Reset</button>' . "\n";
$html = str_replace( '</div>', $reset_btn . '</div>', $html );
}