/** * Name: fw_setNightlyPrices * Desc: Sets up the registration site prices checkboxes **/ add_filter(‘frm_setup_new_fields_vars’, ‘fw_setNightlyPrices’, 20, 2); function fw_setNightlyPrices($values, $field) { if ($field->id == RALLY_REGISTRATION_NIGHTS_AND_PRICES_SITE_1_FIELD_ID) { $rally_registration_data_entry_key = $_GET[“event_entry_key”]; $rally_event_data_entry = FrmEntry::getOne(FrmEntry::get_id_by_key($rally_registration_data_entry_key), true); $prices = array(); for($site=1;$sitemetas[FrmField::get_id_by_key($field_key)] : 0;…Continue reading
/** * Changes the labels of a lookup field’s checkbox options to their values. * * This filter is specific to the Formidable Forms plugin and targets * the options of a lookup field before they are displayed. * *…Continue reading
add_action(‘frm_after_create_entry’, ‘fw_afterGetUsernameRequest’, 30, 2); function fw_afterGetUsernameRequest($entry_id, $form_id) { if ($form_id == GET_USERNAME_FORM_ID) { $email = FrmEntryMeta::get_entry_meta_by_field($entry_id, GET_USERNAME_EMAIL_FIELD_ID); global $wpdb; $prefix = $wpdb->prefix; $sql = “SELECT item_id FROM {$prefix}frm_item_metas WHERE meta_value=%s AND (field_id=%d OR field_id=%d)”; error_log(“fw_afterGetUsernameRequest email: $email”); error_log(“fw_afterGetUsernameRequest sql: $sql”);…Continue reading
//add the Entry ID for each rally form to a number field in the form add_action(‘frm_after_create_entry’, ‘frm_add_entry_id_f946’, 42, 2); function frm_add_entry_id_f946 ($entry_id, $form_id){ if ( $form_id == 30 ) { //change 30 to the ID of your form FrmEntryMeta::add_entry_meta( $entry_id,…Continue reading
//add the Entry KEY for each rally form to a text field in the form add_action( ‘frm_after_create_entry’, ‘frm_add_entry_id_f947’, 42, 2 ); function frm_add_entry_id_f947 ( $entry_id, $form_id ) { if ( $form_id == 30 ) { //change 30 to the ID…Continue reading
/** * Name: getProfilePicture * Desc: If the profile picture exists in the entry, user it. Otherwise use the Gravatar (which may be the default) * **/ add_shortcode(‘fw-get-profile-image’, ‘fw_getProfileImage’); function fw_getProfileImage($atts) { $entry_id = $atts[“entry_id”]; $entry = FrmEntry::getOne($entry_id, true); $primary…Continue reading
add_filter( ‘frm_setup_edit_fields_vars’, ‘fw_checkPhoneValue’, 20, 3 ); function fw_checkPhoneValue( $values, $field, $entry_id ) { //echo “fieldid: ” . $field->id . ““; if ( $field->id == MEMBER_REGISTRATION_PHONE_PRIMARY_FIELD_ID ) { print_r($values); $phone2 = FrmEntryMeta::get_entry_meta_by_field( $entry_id, MEMBER_REGISTRATION_PHONE_PRIMARY_FIELD_ID); echo “Phone2: $phone2“; } return $values; }Continue reading
add_filter(‘frm_validate_entry’, ‘remove_errors_in_admin_area’, 20, 2); function remove_errors_in_admin_area($errors, $values){ if ( $values[‘form_id’] == 23 && is_admin() ) { //Change 23 to the ID of your form return array(); } return $errors; } /* add_filter(‘frm_validate_entry’, ‘remove_errors_in_admin_area’, 20, 2); function remove_errors_in_admin_area($errors, $values){ if (…Continue reading
function custom_forgot_password_text($text) { return str_replace(‘Forgot your password?’, ‘Forgot your username or password?’, $text); } add_filter(‘gettext’, ‘custom_forgot_password_text’);Continue reading
add_filter(‘retrieve_password_message’, ‘custom_password_reset_email’, 10, 4); add_filter(‘wp_mail_content_type’, ‘set_html_content_type’); function custom_password_reset_email($message, $key, $user_login, $user_data) { $site_name = wp_specialchars_decode(get_option(‘blogname’), ENT_QUOTES); $user_nickname = get_user_meta($user_data->ID, ‘nickname’, true); $user_display_name = $user_data->display_name; // Changed to use direct property $user_name = !empty($user_nickname) ? $user_nickname : $user_login; // $reset_url =…Continue reading