Created
November 8, 2019 11:38
-
-
Save New0/e37c8c5f413c75eff51f70bab7be3cac to your computer and use it in GitHub Desktop.
Replace text in CF Connected Forms buttons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: CF custom code | |
* Author: New0 | |
* Description: Force connected Submit button text if translation didn't apply | |
*/ | |
add_action('wp_footer', function() { | |
?> | |
<script type="text/javascript"> | |
document.addEventListener("DOMContentLoaded", connectedFormsButtonText); | |
jQuery( document ).ajaxComplete( connectedFormsButtonText ); | |
function connectedFormsButtonText() { | |
if(jQuery("#cffld_nextnav_1").attr('value') === "Submit"){ | |
jQuery("#cffld_nextnav_1").attr('value', 'Pošalji'); | |
} | |
} | |
</script> | |
<?php | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment