[ad_1]
Hello,
Thanks for the feedback!
The action() you see in the documentation are simply describing the available variations for the said hook. You should choose one variation and use add_action() in your code, as in the example code.
For example, if you want to target all custom actions named my-action, in any form:
add_action('acfe/form/validate_my-action', 'my_form_validation', 10, 2);
function my_form_validation($form, $action){// ...
}
Or, if you want to target the custom action named my-action in the form named my-form:
add_action('acfe/form/validate_my-action/form=my-form', 'my_form_validation', 10, 2);
function my_form_validation($form, $action){// ...
}
Hope it helps!
Have a nice day!
Regards.
