Tell us what you are trying to do?
For a given CPT entry, I want to perform various actions by selecting one of several buttons on a form. Some of the actions may update the entry, other actions may only use the custom fields from the entry but not update them.
Is the single-form approach viable? That is, I'm not sure how the PHP code inside a filter that will recognize which submit button was pressed.
Or, should I create multiple forms (each with a single submit button) and integrate them into a layout for the CPT entry?
Is there any documentation that you are following?
CRED
Is there a similar example that we can see?
No
What is the link to your site?
N/A
I don't have a working form yet, so no screenshot at this time.
I simply want to know if it's 1) practical to use multiple submit buttons on a single form, and 2) if it's a good practice to do so, or 3) whether I should consider creating a single layout that contains multiple forms that each have only a single submit button.
1) practical to use multiple submit buttons on a single form,and 2) if it's a good practice to do so, or 3) whether I should consider creating a single layout that contains multiple forms that each have only a single submit button.
==> Well - its not suggested to use single submit button for multiple forms as with CRED each form rendered with fields its own CRED form ID and it may break things and will not work as expected.
Just to clarify, I never suggested using a single submit button for multiple forms. That's not what I want to do.
I wanted to know whether it was a good idea to use multiple submit buttons on a single form (so that each one could trigger a separate set of actions), or whether I should consider integrating multiple forms (each with its own submit button) into a single Layout .
whether I should consider integrating multiple forms (each with its own submit button) into a single Layout .
==> Yes - this is the suggested way to follow, each form with its own submit button and yes, you can use multiple forms with single layout.