Skip to content

Instantly share code, notes, and snippets.

View dexit's full-sized avatar
🎯
Focusing

Rihards Mantejs dexit

🎯
Focusing
View GitHub Profile
@dexit
dexit / registration.php
Created December 17, 2025 13:23 — forked from Asikur22/registration.php
Create a User Registration Form in Elementor
/*
* Create new user from Elementor form
*/
add_action( 'elementor_pro/forms/new_record', 'gl_elementor_form_create_new_user', 99, 2 );
function gl_elementor_form_create_new_user( $record, $ajax_handler ) {
$form_id = $record->get_form_settings( 'id' );
if ( 'register_form' !== $form_id ) {
return;
}
@dexit
dexit / elementor-form-hcaptcha-handler.php
Created December 17, 2025 12:57 — forked from DavePodosyan/elementor-form-hcaptcha-handler.php
hCaptcha Integration for Elementor Forms
<?php
/**
*
* A simple integration of hCaptcha with Elementor Forms, following Elementor’s pattern for reCAPTCHA.
*
* Instructions:
* 1. Add this file to your WordPress theme directory.
* 2. Include the file in your theme's `functions.php` file using:
*
@dexit
dexit / elementor-form-turnstile-handler.php
Created December 17, 2025 12:56 — forked from DavePodosyan/elementor-form-turnstile-handler.php
Cloudflare Turnstile Integration for Elementor Forms
<?php
/**
*
* A simple integration of Cloudflare Turnstile with Elementor Forms, following Elementor’s pattern for reCAPTCHA.
*
* Instructions:
* 1. Add this file to your WordPress theme directory.
* 2. Include the file in your theme's `functions.php` file using:
*
@dexit
dexit / form
Created December 17, 2025 12:54 — forked from bugnumber9/form
add_action( 'elementor_pro/forms/validation', function( $form_record, $ajax_handler ) {
if ( 'Test Form 1' !== $form_record->get_form_settings( 'form_name' ) ) {
return;
}
$fields = $form_record->get('fields');
$email = $fields['email']['value'];
if ( email_exists( $email ) ) {
<?php
/**
* List Table API: WP_Posts_List_Table class
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
/**
@dexit
dexit / Wordpress old version function.php
Created December 12, 2025 13:37 — forked from JusTruetice/Wordpress old version function.php
Wordpress old version function.php main
<?php
/**
* Theme functions and definitions
*
* @package HelloElementor
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Homeo_Elementor_RealEstate_Search_Form extends Elementor\Widget_Base {
public function get_name() {
return 'apus_element_realestate_search_form';
@dexit
dexit / functions.php
Created December 12, 2025 13:30 — forked from ppcdias/functions.php
WordPress Elementor Form Submit Overlay
<?php
// Adds a custom loading overlay for Elementor forms
function custom_elementor_loading_overlay() {
// Only execute on front-end (not in admin panel)
if (!is_admin()) {
// Enqueue jQuery
wp_enqueue_script('jquery');
?>
<style type="text/css">
/* Main overlay styles remain unchanged */
@dexit
dexit / get-meta-without-email-action-webhook.php
Created December 12, 2025 13:23
request_args elementor form webhooks access the meta without email action
<?php
/**
* @param array $args Webhook request arguments.
* @param Form_Record $record An instance of the form record.
*/
add_filter( 'elementor_pro/forms/webhooks/request_args', function( $args, $record ) {
$meta_keys = [
'date',
'time',
'page_url',
@dexit
dexit / custom-code.js
Created December 8, 2025 13:46
Elementor Popup based LearnerEnquiry Form Hubspot hutk pagename, pageurl, and input masks for phone and postcode
const debuggerMode = true;
const retryCount = 3; // Retry count for setting hutk value
const hutkFieldSelector = '#form-field-hutk';
const pageUriSelector = '#form-field-pageUri';
const formSelector = '#learner_enquiry'; // Use the form ID or a class to select the form
function log(message) {
if (debuggerMode) {
console.log(message);
}