Support

Account

Home Forums Front-end Issues Add from to edit account page two submit buttons

Solving

Add from to edit account page two submit buttons

  • Hello, I added a from in the frontend edit-account page. There are two submit buttons and the original button is not working. I would be very please if anyone can help.

    function action_woocommerce_edit_account_form(  ) { 
    acf_form_head();
    
        $current_user = wp_get_current_user();
    	$options = array(
    		    'post_id' => 'user_'.$current_user->ID,
    		    'field_groups' => array(84),
    		    'form' => true, 
    		    'return' => add_query_arg( 'updated', 'true', get_permalink() ), 
    		    'html_before_fields' => 'Hello',
    		    'html_after_fields' => 'Yes',
    		    'submit_value' => 'Update' 
    		);
    		acf_form( $options );
    }
    
    add_action( 'woocommerce_edit_account_form', 'action_woocommerce_edit_account_form', 10, 0 );
  • Here is the screenshot.

  • When inserting a form inside of another form you need to set

    
    'form' => false
    
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.