Skip to content

Instantly share code, notes, and snippets.

@cpaul007
Created May 5, 2020 06:37
Show Gist options
  • Save cpaul007/e1561a0893a0c402a5c42deb686992ea to your computer and use it in GitHub Desktop.
Save cpaul007/e1561a0893a0c402a5c42deb686992ea to your computer and use it in GitHub Desktop.
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 );
}
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment