I am trying to update a True/False subfield from a Repeater Field on an option page when a CF7 form has been sent.
CF7 JS code:
<script type="text/javascript">
document.addEventListener( 'wpcf7mailsent', function( event ) {
.....
}, false );
</script>
PHP working code:
<?php update_sub_field( array('repeater_field', 1, 'true_false_subfield'), 'yes', option );?>
I’ve looked at https://www.advancedcustomfields.com/resources/javascript-api/, but I can’t find a way to do it.
Any ideas?
Thanks!