Skip to content

Instantly share code, notes, and snippets.

@jadealombro
Created May 25, 2022 15:47
Show Gist options
  • Save jadealombro/8f1e3bfe87ec7d30086df8b6f0a624eb to your computer and use it in GitHub Desktop.
Save jadealombro/8f1e3bfe87ec7d30086df8b6f0a624eb to your computer and use it in GitHub Desktop.
add_action( 'wpforms_wp_footer_end', function() { ?>
<script type="text/javascript">
;(function($) {
if( $('#wpforms-101')) {
$("#wpforms-101-field_5").on("input", function(){
var the_date = new Date($(this).val());
the_date.setDate(the_date.getDate() + 1);
$('#wpforms-740-field_25').val( the_date.toLocaleDateString('en-US') );
});
}
})(jQuery);
</script>
<?php }, 30 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment