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
//Load email library | |
$this->load->library('email'); | |
//SMTP & mail configuration | |
$config = array( | |
'protocol' => 'smtp', | |
'smtp_host' => 'ssl://smtp.googlemail.com', | |
'smtp_port' => 465, | |
'smtp_user' => 'user@gmail.com', | |
'smtp_pass' => 'gmail_password', |
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
/*Change input border color when input is selected/focused */ | |
.ff-el-form-control:focus { | |
border-color:red; | |
outline: none; | |
-webkit-box-shadow: 0 0 0 3px rgba(255, 0, 129, 0.25); | |
box-shadow: 0 0 0 3px rgba(255, 0, 129, 0.25); | |
} |
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 | |
* |
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
/* | |
* 1. Add this in function.php file | |
* 2. Change form ID | |
* 3. Change input attribute name | |
*/ | |
add_filter('fluenform_rendering_field_data_select', function ($data, $form) { | |
if ($form->id != 91) { | |
return $data; | |
} |
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 to push a task for background processing | |
* @param: string $callbackName - Your classback acction name | |
* @param: mixed $payload - Your payload data that you will get when procssing on callback | |
*/ | |
function my_custom_queue_on_background($callbackName, $payload) | |
{ |
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 | |
add_filter('fluentform_form_settings_smartcodes', function ($groups) { | |
$groups[0]['shortcodes']['{adrian_all_data}'] = 'Custom All Data'; | |
return $groups; | |
}); | |
add_filter('fluentform_shortcode_parser_callback_adrian_all_data', function ($return, $instance) { | |
$form = $instance::getForm(); |
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
use FluentForm\App\Modules\Form\FormDataParser; | |
use FluentForm\App\Modules\Form\FormFieldsParser; | |
if (isset($_GET['test'])) { | |
function getEntry($id, $form) | |
{ | |
$submission = wpFluent()->table('fluentform_submissions')->find($id); | |
$formInputs = FormFieldsParser::getEntryInputs($form, ['admin_label', 'raw']); |
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 | |
// Add this function to function.php and change target form ID | |
add_filter('fluentform_rendering_form', function ($form) { | |
// change form ID | |
$targetFormId = 108; | |
if ($form->id != $targetFormId) { | |
return $form; |
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
add_filter('fluentform_validate_input_item_repeater_field', function ($errorMessage, $field, $formData, $fields, $form) { | |
$name = 'repeater_field'; | |
$data = $formData[$name]; | |
$col_index = 0; | |
$values= array_column($data,$col_index); | |
$unique_count = count(array_unique($values)); | |
$count = count($values); | |
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 | |
add_filter('fluentform_rendering_field_data_input_checkbox', function ($data, $form) { | |
{ | |
//change form ID | |
if ($form->id != 5) { | |
return $data; | |
} | |
//set get param value & match with checkbox value | |
if (isset($_GET['my_value'])) { |
OlderNewer