Hooks (Actions and Filters)

We will introduce WordPress hooks (actions/filters) as defined in AForms.

We will introduce WordPress hooks (actions/filters) as defined in AForms.
Hooks are a function for advanced users, so a detailed explanation will not be provided.
The information about AForms 2.0.0.

aforms_load_rule

aforms_load_rule($rule, $form);

Loading the calculation rule settings.
$rule is the setting for the calculation rule.
$form is an object that represents the form to apply the calculation rule to.

aforms_load_word

aforms_load_word($word, $form);

A filter that allows you to customize the word settings.
$word is the setting for words.
$form is an object that represents the form to apply words to.

aforms_load_behavior

aforms_load_behavior($behavior, $form);

A filter that allows you to customize the behavior settings.
$behavior is the setting for a behavior.
$form is an object that represents the form to apply the setting for a behavior to.

aforms_get_stylesheet

aforms_get_stylesheet($url, $form);

This filter allows you to customize the URL of the style sheet.
$url is the URL of the stylesheet.
$form is an object that represents the form to load the stylesheet into.

aforms_get_sidebar_selector

aforms_get_sidebar_selector($sidebarSelector, $formId);

This filter is to customize the form’s quotation display to be placed in the sidebar. Please return the selector of the sidebar element (such as “#sidebar”).
$sidebarSelector is a selector for sidebar elements.
$formId is the ID of the form to which the sidebar is applied.

With this filter, you can control the behavior of the AForms program, but that does not mean that it will conform to your site’s style.
You need to change the style in css after changing the behavior of the program with this filter.

aforms_compose_thanks_mail

aforms_compose_thanks_mail($mail, $form, $order);

This filter is to customize the thank-you mail (automatic reply mail).
$mail is an object that represents mail.
$form is an object that represents the related form.
$order is an object that represents the related order (the result of the form submission).

aforms_compose_report_mail

aforms_compose_report_mail($mail, $form, $order);

This filter is to customize the notification mail.
$mail is an object that represents mail.
$form is an object that represents the related form.
$order is an object that represents the related order (the result of the form submission).

0 0