Skip to content

Instantly share code, notes, and snippets.


Victor M. Font Jr. vfontjr

View GitHub Profile
View populate_additional_workflow.php
add_action('frm_after_update_entry', 'populate_additional_workflow', 10, 2);
function populate_additional_workflow( $entry_id, $form_id ) {
/* get the project form id */
$project_form = FrmForm::get_id_by_key('project_with_workflow');
if( $form_id == $project_form ) {
/* initialize variables */
global $wpdb, $user_ID;
View robl-source-code.php
add_action('frm_after_create_entry', 'generate_form_e2pdf_for_summary', 30, 2);
add_action('frm_after_update_entry', 'generate_form_e2pdf_for_summary', 10, 2);
function generate_form_e2pdf_for_summary($entry_id, $form_id) {
global $wpdb;
$formIdList = array(1,2,3); // use your own list of form ids for which you use e2pdf
View disable-form-submit-button.html
<div class="frm_submit" style="display:none;">
[if back_button]<button type="submit" name="frm_prev_page" formnovalidate="formnovalidate" class="frm_prev_page" [back_hook]>[back_label]</button>[/if back_button]
<button class="frm_button_submit" type="submit" [button_action] disabled>[button_label]</button>
[if save_draft]<a href="#" tabindex="0" class="frm_save_draft" [draft_hook]>[draft_label]</a>[/if save_draft]
View frm_save_api_response.php
/* this will write the QR Code URL to the form entry */
add_action( 'frmapi_post_response', 'frm_save_api_response', 10, 3 );
function frm_save_api_response( $response, $entry, $form_action ) {
/* convert the response to a PHP object */
$results = json_decode($response['body']);
/* get the results code */
$code = $response['response']['code'];
View change-start-day.js
jQuery(document).ready(function($) {
"use strict";
/* change the calendar start day when date field receives foucus */
$('#field_zkbet').on('focus', function() {
/* get the radio button value */
var selected_day = $('input[name="item_meta[286]"]:checked').val();
View form-checkbox.html
<div id="frm_field_[id]_container" class="frm_form_field form-field [required_class][error_class]">
<div id="field_[key]_label" class="frm_primary_label">[field_name]
<span class="frm_required">[required_label]</span>
<div class="frm_opt_container" aria-labelledby="field_[key]_label" role="group">
[input opt=1 data-results="correct" data-question="2"]
[input opt=2 data-results="wrong" data-question="2"]
[input opt=3 data-results="correct" data-question="2"]
[input opt=4 data-results="wrong" data-question="2"]
[input opt=5 data-results="correct" data-question="2"]
View appt-confirmation-email.html
Hello [confirm_name],</br>
This confirms that your appointment for your [confirm_vehicle] is scheduled for [if confirm_which_date equals="primary"][confirm_date_of_service][/if confirm_which_date][if confirm_which_date equals="alternate"][confirm_alternate_date_of_service][/if confirm_which_date].</br>
Thank you!
View display-star-icons.css
.star-rating-hover::before {
content: '\e9d9';
color: #F0AD4E;
.frm-star-group input[type="radio"]:checked + label::before,
.frm-star-group:not(.frm-star-hovered) input[type="radio"]:checked + label::before {
color: #F0AD4E;
View enable-tooltip.js
jQuery(function() {
"use strict";
$( document ).tooltip();
vfontjr / css_file.css
Last active Nov 13, 2020
Source code for
View css_file.css
<style type="text/css">
.color_red {
background-color: red !important;
color: #fff !important;
.color_yellow {
background-color: yellow !important;
color: #000 !important;