This file contains hidden or 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
<input type="text" id="field_97w00-0" name="item_meta[87][0][89]" value="" data-invmsg="Text is invalid" data-sectionid="87"> |
This file contains hidden or 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( 'genesis_post_crumb', 'remove_category_from_crumb_url', 10, 3); | |
function remove_category_from_crumb_url( $crumb, $args, $cat_crumb ) { | |
$crumb = str_replace("/category/","/",$crumb); | |
return $crumb; | |
} |
This file contains hidden or 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_after_create_entry', 'populate_acf_repeater', 30, 2); | |
function populate_acf_repeater( $entry_id, $form_id ) { | |
/* make sure we're working with the correct form * | |
* change 30 to the ID of your form */ | |
if ( $form_id == 30 ) { | |
/* get the entry header from wp_frm_items */ |
This file contains hidden or 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('genesis_skip_links_output','remove_custom_skiplink'); | |
function remove_custom_skiplink( $links ) { | |
$links['my-custom-link'] = esc_html__( 'Skip to my custom element', 'genesis' ); | |
return $links; | |
} |
This file contains hidden or 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_headb1, #field_headb2').on('keyup', function() { | |
var characters = $(this).val().length, | |
target_elem = "frm_field_" + $(this).attr("data-target") + "_container"; | |
/* write the count to the element */ | |
$(target_elem).html( characters + ' characters'); | |
}); |
This file contains hidden or 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"; | |
$('input[name="item_meta[185][]"]').on('change', function() { | |
var selected_div_class = '', | |
remove_div_class = ''; | |
$('input[name="item_meta[185][]"]').each( function() { | |
if ( $(this).prop("checked") ) { | |
/* apply the highlight class to the selected option's parent div */ |
This file contains hidden or 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('frm_setup_new_fields_vars', 'my_repeater_counter', 20, 3); | |
function my_repeater_counter($values, $field, $args ) { | |
if ( $field->id == 234 ){ | |
$values['value'] = $args['key_pointer'] + 1; | |
} | |
return $values; | |
} |
This file contains hidden or 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( 'frm_validate_field_entry', 'conditionally_require_a_field', 10, 3 ); | |
function conditionally_require_a_field( $errors, $field, $value ) { | |
if ( $field->id == 25 && trim( $value ) == '' ) { //change 25 to the ID of the field to require | |
/* get the current user object */ | |
$current_user = wp_get_current_user(); | |
/* */ | |
if ( in_array('administrator', $current_user->roles ) ) { // change 'administrator' to the role you want to make this requireed |
This file contains hidden or 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_after_create_entry', 'create_new_cpt_taxonomy', 30, 2 ); | |
function create_new_cpt_taxonomy( $entry_id, $form_id ) { | |
/* first thing to do is to make sure this runs on the correct form */ | |
if( $form_id == 32 ) { //change 32 to the ID of your form | |
if( isset( $_POST['item_meta'][254] ) ) { //change 254 to the ID of the field used to add a category |