Hello,
Thanks for the feedback!
Yes, it’s the weekend, so all my time is dedicated to the plugin development ??
I’m glad to hear you managed to make it work! In fact, the Custom Action doesn’t handle value preloading, you’ll have to handle that part using the acfe/form/load
PHP hook (See documentation), or directly within the form render function. Usage example:
acfe_form(array(
'name' => 'my-form', // Call by name
'map' => array( // Change field settings
'field_621a65cc5521e' => array(
'label' => 'New label',
'instructions' => 'New instructions',
'value' => 'New default value'
),
)
));
You can also use the native ACF hook acf/prepare_field
if you prefer (See documentation).
The Custom Action hook doesn’t allow to preload value because there is no UI to define which Post/Term/User/Options Page should be used as “Save Target” or “Loading Source”. As you mentioned, those settings are builtin the dedicated WP object Actions such as Post Action, User Action etc…
It should by used for custom code that isn’t handled by WP, for example when sending data to an external API or service. It can be also used by developers that prefer handle everything within the code, and still being able to repeat the same action in different forms, just by using the same action name.
Note that Actions in the UI aren’t mandatory, developers can handle everything in code using the Global Form Hooks (Validation, Submission).
Hope it helps!
Have a nice day!
Regards.