Helpers
Eightshift Forms offers static helpers that can be implemented in your project. The key difference between these helpers and filters is that you can use the former in your theme or plugin code regardless of the load cycle.
All helpers can be found here.
esFormsGetFormIdByName
This function retrieves the custom, unique name of a form, as set in the Form settings, from the provided form ID. It's useful when applying specific settings to one or more forms using filters in your project.
Form identification by name (instead of the default "by ID"), can be useful if switching environments when the form ID could change.
if (\function_exists('esFormsGetFormIdByName')) {
echo esFormsGetFormIdByName('<form-id>');
}
esFormsDecryptor
This helper provides decrypt and encrypt methods for variations set in the Form settings, passed to the "Thank you" page after form submission.
if (\function_exists('esFormsDecryptor')) {
$variation = isset($_GET['es-variation']) ? \esFormsDecryptor(\sanitize_text_field(\wp_unslash($_GET['es-variation']))) : '';
}