Resumo de IA
Descrição
The wpforms_wp_footer action is triggered at the end of the page load only if a form created with WPForms is found on the page.
Parâmetros
Esta ação não aceita nenhum parâmetro.
Mais Informações
This action works much like the standard WordPress wp_footer action. It will run at the end of the page load, but specifically for the wpforms_wp_footer action, it will only fire if there is a form created with WPForms found on that page.
This is especially useful if you have any custom JavaScript or custom CSS on the page but you don’t want that code to run if there isn’t a WPForms on the page.
Fonte
wpforms/includes/class-frontend.php
Exemplos
This example is pulled from a snippet reference (link shown below) and it’s using Javascript and the wpforms_wp_footer action to disable the scroll animation on multi-page forms.
/**
* Change the captcha theme for the Google Checkbox v2 reCAPTCHA
*
* @link https://wpforms.com/developers/how-to-change-the-captcha-theme-on-google-checkbox-v2-recaptcha/
*/
function wpf_dev_disable_multipage_scroll() {
?>
<script type="text/javascript">window.wpforms_pageScroll = false;</script>
<?php
}
add_action( 'wpforms_wp_footer', 'wpf_dev_disable_multipage_scroll', 30 );
Relacionado
Referências do Artigo:
- Como Modificar as Strings do Seletor de Data do Campo de Data
- How to Disable Scroll Animation on Multi Page Forms
- Como personalizar as opções de data do campo Data e Hora
- Como Alterar o Tempo Limite no Upload Moderno de Arquivos
- How to Provide an Age Restriction on the Datepicker Form Field
- How to Change the Scrolling Speed on Multi Page Forms
- How to Allow the Date Picker Inside Conversational Forms
- How to Skip Page Breaks When Using Conditional Logic
- Como Definir um Número Mínimo de Caracteres em um Campo de Texto do Formulário