Hi,
According to your post, my understanding is that you wanted to remove the submit button when submitted the data.
You can do the steps as below.
1. Insert two textbox controls(such as field1 and field2) and a button control.
2. Set the fields2 textbox default value Yes, then add a formatting rule, add a condition field2 is not blank, select the Hide this control.
3. Add two formatting rules for the button control, add two conditions field2 = No and field1 is not blank, then select the Hide this control.
4. Add a Action rule for the button control, in Run this action area, click Add, then Set a fields value, set field2=No. Then add Submit data, add a SharePoint library data connection.
The field2 textbox is hidden by default, when you type data in the field1 textbox, then click the button control, then data would submit and the button would hide.
When you reopen the form in the library, the button would be hidden.
Thanks & Regards,
Jason