View fluentform-submission-success.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Event on form submission success | |
// You can paste this script to Form's custom JS Box | |
$form.on('fluentform_submission_success', function() { | |
// You can run your own JS and will be run on successful form submission | |
}); |
View fluentform-checkbox-max-restriction.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Function to prevent users mark more than expected items. | |
* This code must need to be placed in custom JS of your form | |
* @param: containerClass String - The contaner class of the target checkbox block. | |
* You can add a custom container class in the form settings | |
* | |
* @param: maxChecked Integer - Max Number of items user can mark | |
* @return: void | |
* | |
*/ |
View fluentform-login-form.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Code snippet to make login form with Fluent Forms WordPress Plugins | |
* Steps: | |
* 1. make a form with email and password (Make sure the name attribute is 'email' and 'password' for corresponding field) | |
* 2. Paste the shorcode in a page | |
* 3. Change the form id in the bellow code (23) with your created fluentform's form id and paste in your theme's functions.php file | |
* 4. That's it | |
* |
View sream_function.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function zcast_stream($file, $content_type = 'application/octet-stream') { | |
@error_reporting(0); | |
// Make sure the files exists, otherwise we are wasting our time | |
if (!file_exists($file)) { | |
header("HTTP/1.1 404 Not Found"); | |
exit; | |
} |
View Convert Numbers to Words - Bangladesh.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Function: convert_number | |
* | |
* Description: | |
* Converts a given integer (in range [0..1T-1], inclusive) into | |
* alphabetical format ("one", "two", etc.) | |
* | |
* @int | |
* |
View fluent-forms-learndash-course-enrollment.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This snippet is assuming the user already logged in or the provided email address is available in users | |
* After the form submission the user will be added to the course. | |
*/ | |
add_action( 'fluentform_submission_inserted', 'ff_register_user_to_learndash_course', 100, 3 ); | |
function ff_register_user_to_learndash_course( $entryId, $formData, $form ) { | |
// Check if the form is the one we want |
View ninja_tables_json_data_api.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Code snippet to expose ninja tables data as JSON via URL | |
* Example URL: https://yourdomain.com/?get_ninja_table_data=1463&key=your_security_key | |
* In this url 1463 is the table ID that you want to access the data using JSON | |
* You should change the key 'your_security_key' in the url as well in the code | |
* to protect the endpoint | |
*/ | |
add_action('init', function() { |
View event-for-all-forms.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
if(typeof gtag != 'function') { | |
return; | |
} | |
var fluentForms = $('form.frm-fluent-form'); | |
fluentForms.each(function() { | |
var $form = $(this); | |
var formId = $form.attr('data-form_id'); | |
gtag('event', 'ViewForm', { |
View NinjaTablesShortcodeUsage.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// The following Table Shortcode will show 5 rows per page | |
[ninja_tables id='YOUR TABLE ID HERE' per_page=5] | |
// The following Table Shortcode will not show search bar | |
[ninja_tables id='YOUR TABLE ID HERE' search=0] | |
// The following Table shorcode will disable table sorting | |
[ninja_tables id='YOUR TABLE ID HERE' sorting=0] |
NewerOlder