Skip to content

Instantly share code, notes, and snippets.

View alfredo-wpmudev's full-sized avatar
🏠
Working from home

Alfredo Galano Loyola alfredo-wpmudev

🏠
Working from home
View GitHub Profile
@alfredo-wpmudev
alfredo-wpmudev / forminator_autoload_ACF_data.php
Last active May 11, 2024 21:15
Getting ACF field data from user profile then filling the data in the form
<?php
/*
Plugin Name: Forminator Pro Autofill Data from User ACF Fields
Version: 1.0
Description: Forminator Pro Autofill Data from User ACF Fields
Author: Alfredo Galano Loyola
Author URI: https://wpmudev.com/
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
@alfredo-wpmudev
alfredo-wpmudev / forminator_hidden_embed_url_last_path.php
Created April 16, 2024 21:55
Customize Forminator Hidden Field -> Embed URL to only save the last path of the URL
<?php
/**
* Plugin Name: [Forminator Pro] - Hidden Field -> Embed URL replace with last URL path.
* Plugin URI: https://wpmudev.com/
* Description: Hidden Field -> Embed URL replace with last URL path.
* Author: Alfredo Galano Loyola @ WPMUDEV
* Author URI: https://wpmudev.com/
* License: GPLv2 or later
*/
if (!defined('ABSPATH')) {
@alfredo-wpmudev
alfredo-wpmudev / verfication_form_exported.txt
Created April 15, 2024 03:13
Taekwondo Verificator Forminator Form, Import it in your site
{"type":"form","data":{"fields":[{"id":"name-1","element_id":"name-1","form_id":"wrapper-6868-7526","parent_group":"","type":"name","options":[],"cols":"12","conditions":[],"wrapper_id":"wrapper-6868-7526","field_label":"Last Name","placeholder":"E.g. Doe","prefix_label":"Prefix","fname_label":"First Name","fname_placeholder":"E.g. John","mname_label":"Middle Name","mname_placeholder":"E.g. Smith","lname_label":"Last Name","lname_placeholder":"E.g. Doe","prefix":"true","fname":"true","mname":"true","lname":"true","required_message":"Name is required.","prefix_required_message":"Prefix is required.","fname_required_message":"First Name is required.","mname_required_message":"Middle Name is required.","lname_required_message":"Last Name is required.","layout_columns":"2"},{"id":"date-1","element_id":"date-1","form_id":"wrapper-2563-7322","parent_group":"","type":"date","options":[],"cols":"12","conditions":[],"wrapper_id":"wrapper-2563-7322","field_type":"picker","date_format":"dd\/mm\/yy","default_date":"none"
@alfredo-wpmudev
alfredo-wpmudev / forminator_taekwondo_student_verificator.php
Last active April 15, 2024 21:21
[Forminator Pro] - Taekwondo Student Verification for User and ACF fields.
<?php
/**
* Plugin Name: [Forminator Pro] - Taekwondo Student Verification for User and ACF fields.
* Plugin URI: https://wpmudev.com/
* Description: Taekwondo Student Verification for User and ACF fields.
* Author: Alfredo Galano Loyola @ WPMUDEV
* Author URI: https://wpmudev.com/
* License: GPLv2 or later
*/
if (!defined('ABSPATH')) {
@alfredo-wpmudev
alfredo-wpmudev / hustle_flodesk.js
Created April 6, 2024 21:16
Hustle Popup and Flodesk integration to trigger events after submit the form succesfully
jQuery( document ).ready(function() {
//This is the ID of the Flodesk form, it's on the HTML embed code
var myFlodeskFormID = "fd-form-66117b239213c48f3b2c8798";
//The Hustle Popup ID, can be found in the URL while editing it or in the shortcode
var myHustlePopupID = 12;
//The time you want to wait after the form is submited to check if was a success
var myWaitingTimeAfterSubmit = 3000;
function setNeverSeeAgain(module_id){
var cookieName = "inc_optin_never_see_again-popup-"+module_id;
@alfredo-wpmudev
alfredo-wpmudev / forminator_aws_price_prediction.php
Created March 27, 2024 01:46
Dummy example of how to use Forminator Pro to send fields as an Array to external API
<?php
/**
* Plugin Name: [Forminator Pro] - AWS Price Prediction
* Plugin URI: https://wpmudev.com/
* Description: AWS Price Prediction
* Author: Alfredo Galano Loyola @ WPMUDEV
* Author URI: https://wpmudev.com/
* License: GPLv2 or later
*/
if (!defined('ABSPATH')) {
{"type":"form","data":{"fields":[{"id":"number-1","element_id":"number-1","form_id":"wrapper-9774-9371","parent_group":"","type":"number","options":[],"cols":"12","conditions":[],"wrapper_id":"wrapper-9774-9371","hidden_behavior":"zero","calculations":"true","limit_min":"1","limit_max":"150","field_label":"How many times a day do you count each till?","placeholder":"","required":"1"},{"id":"number-2","element_id":"number-2","form_id":"wrapper-2717-9677","parent_group":"","type":"number","options":[],"cols":"12","conditions":[],"wrapper_id":"wrapper-2717-9677","hidden_behavior":"zero","calculations":"true","limit_min":"1","limit_max":"150","field_label":"How many floats are prepared per till each day?","placeholder":"","formid":"wrapper-2717-9677","required":"1"},{"id":"number-3","element_id":"number-3","form_id":"wrapper-1534-6055","parent_group":"","type":"number","options":[],"cols":"12","conditions":[],"wrapper_id":"wrapper-1534-6055","hidden_behavior":"zero","calculations":"true","limit_min":"1","limit_ma
<?php
/**
* Plugin Name: Add shortcode list all blog sites
* Description: Add shortcode list all blog sites ([wpmudev_list_all_blogs]) - 1155576029146873
* Author: Thobk @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
return;
@alfredo-wpmudev
alfredo-wpmudev / forminator_group_field.php
Created January 10, 2024 16:37
Allow Group Field Data on Notification without use {all_fields},for example to display {group-1} use {field-group-1}
<?php
/**
* Plugin Name: [Forminator Pro] Allow Group Field Data on Notification
* Description: Allow Group Field Data on Notification without use {all_fields},to display {group-1} use {field-group-1}
* Author: Alfredo Galano Loyola @ WPMUDEV
* Author URI: https://wpmudev.com
* License: GPLv2 or later
*/
add_filter( 'forminator_replace_form_data', 'wpmudev_send_post_data_email', 10, 3 );
function wpmudev_send_post_data_email( $content, $data, $original_content ){
@alfredo-wpmudev
alfredo-wpmudev / forminator-fix-asian-language-character.php
Created January 3, 2024 19:06 — forked from wpmudev-sls/forminator-fix-asian-language-character.php
[Forminator Pro] - Fix weird characters on Forminator PDF when language is asian
<?php
/**
* Plugin Name: [Forminator Pro] Fix weird characters on Forminator PDF when language is asian
* Description: Fixes weird characters on Forminator PDF when language is asian
* Author: Prashant @ WPMUDEV
* Task: SLS-5220
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/