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
.frm-star-group .star-rating { | |
margin-right: .25rem !important; | |
} | |
.frm-star-group input + label::before, .frm-star-group .star-rating::before { | |
font-family: 'Font Awesome 6 Pro' !important; | |
content: '' !important; | |
color: var(--mastermind-primary-color) !important; | |
} | |
.frm-star-group:not(.frm-star-hovered) input[type="radio"]:checked + label::before, .frm-star-group input + label:hover::before, .frm-star-group:hover input + label:hover::before, .frm-star-group .star-rating-on::before, .frm-star-group .star-rating-hover::before { | |
font-weight: 900 !important; |
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 | |
/* use this function for populating entries where | |
* dynamic lookup entry ids are required | |
*/ | |
function masterminds_get_dynamic_field_entry_id_by_value( $field_id, $value ) { | |
global $wpdb; | |
$frm_item_metas_table = $wpdb->prefix . 'frm_item_metas'; | |
$sql = "SELECT item_id FROM `{$frm_item_metas_table}` WHERE field_id = '{$field_id}' AND meta_value = '{$value}'"; | |
return $wpdb->get_var($sql); | |
} |
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 | |
public function determine_charset( $charset, $collate ) { | |
if ( ( $this->use_mysqli && ! ( $this->dbh instanceof mysqli ) ) || empty( $this->dbh ) ) { | |
return compact( 'charset', 'collate' ); | |
} | |
if ( 'utf8' === $charset && $this->has_cap( 'utf8mb4' ) ) { | |
$charset = 'utf8mb4'; | |
} |
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
<script> | |
jQuery(document).ready(function($) { | |
"use strict"; | |
/* change field_s32q2 to the id of your date input field | |
* use your browser's inspection tool to verify the id spelling | |
*/ | |
$('#field_s32q2').on('change', function() { | |
/* create a constant reference to a day name values */ | |
const days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; |
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_shortcode('count_form_entries', 'count_form_entries_callback'); | |
function count_form_entries_callback( $atts ) { | |
$count = 0; | |
if ( !empty( $atts ) ) { | |
$atts = shortcode_atts( array( | |
'frm_id' => '0', | |
'frm_key' => '' | |
), $atts, 'count_form_entries' ); |
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_action('frm_display_form_action', 'check_entry_count', 8, 3); | |
function check_entry_count($params, $fields, $form) { | |
global $user_ID; | |
/* get the current user object */ | |
$current_user = wp_get_current_user(); | |
remove_filter('frm_continue_to_new', '__return_false', 50); | |
if( $form->id == 5 and !is_admin() ) { //replace 5 with the ID of your 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
<script> | |
jQuery(document).ready(function($) { | |
"use strict"; | |
$('#field_xxx').on('change', function() { | |
var total = 0; | |
if ( $(this).val().length > 0 ) { | |
const split_vals = $(this).val().split(", "); | |
var total = 0; | |
for (var i = 0; i < split_vals.length; i++) { |
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
[if w3cfrm_post_content_type equals="Complete"][if w3cfrm_post_content_format equals="Block"] | |
<!-- wp:html --><!-- | |
/* Formidable Forms Accessibility Statement Generator | |
* By Victor Font Consulting Group, LLC | |
* | |
* https://formidable-masterminds.com/accessibility-statement-generator/ | |
* | |
* Author: Victor M. Font Jr. | |
* https://victorfont.com | |
* https://formidable-masterminds.com |
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
<script> | |
jQuery(document).ready(function($) { | |
"use strict"; | |
/* self-executing function */ | |
( function($) { | |
/* this function is a workaround for an apparent Firefox bug | |
* where the default values are sometimes not being displayed | |
* the test form works Safari, Chrome, and Firefox Developer Edition. |
NewerOlder