• Resolved bytbt

    (@bytbt)


    ACF fields in frontend invoice for the user to insert information directly into the invoice, thus being idenfied after payment in the backend. I know that the paid version has an address addon, which allows editing it, but I don’t think it’s possible to insert new editing fields in the frontend, such as phone, alternative email, etc.
    It would be an interesting function to capture user data, such as a checkout, which is the purpose of the invoice, even being able to use it for visiting users, thus identifying them later in the backend.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Elana Davis

    (@elanasparkle)

    Hello @bytbt,

    ?Thank you for reaching out to support! You could try to integrate the ACF into Sprout Invoices with the submission box. However, this is untested on the front end this is primarily for the back end.

    add_filter( 'post_submitbox_start', '_acf_post_submitbox_start' );
    function _acf_post_submitbox_start() {
    	if ( ! in_array( get_post_type(), array( SI_Notification::POST_TYPE, SI_Client::POST_TYPE, SI_Project::POST_TYPE ) ) ) {
    		return;
    	}
    	?>
    		<script type="text/javascript">
    		(function($){
    			acf.add_action('submit', function( $el ){
    				$('input[type="submit"]').removeClass('disabled button-disabled button-primary-disabled');
    			});
    		})(jQuery);
    		</script>
    	<?php
    }

    There is address functionality in the pro version that allows you to edit them. Another option would be to create a form that pulls the data from the WordPress user and have it update the SI_Client data.

    Thanks
    Elana D

    Plugin Contributor Elana Davis

    (@elanasparkle)

    Hello @bytbt,

    I’m going to mark this as closed but don’t hesitate to reach out if you are still having issues or need any further assistance.

    Thanks
    Elana D.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ACF fields in frontend invoice’ is closed to new replies.