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 | |
function add_colors_to_taxonomy_choices( $form ) { | |
global $gf_cpt_addon; | |
if ( empty($gf_cpt_addon) ) { | |
return $form; | |
} | |
foreach( $form['fields'] as &$field ) { | |
$taxonomy = $gf_cpt_addon->get_field_taxonomy( $field ); | |
$colorPickerEnabled = ( isset($field['colorPicker_enableColors']) && !empty($field['colorPicker_enableColors']) ); |
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
/*/////////////////// | |
JetSloth.com | |
Display your Collapsible Sections in tabs with this CSS updates | |
Full article at https://jetsloth.com/labs/display-your-form-with-tabs-using-collapsible-sections/ | |
////////////////////*/ | |
/* /////////////////// Form wrapper /////////////////// */ | |
.form-has-collapsible-sections_wrapper { | |
margin: 0 auto; | |
text-align: left; |
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
<img class="demo-product" src="https://jetsloth.com/wp-content/uploads/2018/09/Artboard-3-Copy-12.png"/> | |
<img class="demo-product" src="https://jetsloth.com/wp-content/uploads/2018/09/Artboard-3-Copy-13.png"/> | |
<img class="demo-product"" src="https://jetsloth.com/wp-content/uploads/2018/09/Artboard-3-Copy-14.png"/> | |
<img class="demo-product" src="https://jetsloth.com/wp-content/uploads/2018/09/Artboard-3-Copy-15.png"/> | |
<img class="demo-artwork" src="https://jetsloth.com/wp-content/uploads/2018/09/I-heart-Jetsloth-1.svg"/> | |
<img class="demo-artwork" src="https://jetsloth.com/wp-content/uploads/2018/09/logo.svg"/> | |
<img class="demo-artwork" src="https://jetsloth.com/wp-content/uploads/2018/09/sloth-logo-royalty-free_defiant-sloth.png"/> | |
<img class="demo-artwork" src="https://jetsloth.com/wp-content/uploads/2019/07/JetSloth-Logo-dark.png"/> |
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 type="text/javascript"> | |
jQuery(document).bind('gform_post_render', function(e, formId, currentFormPage) { | |
var $form = jQuery('#gform_' + formId); | |
$form.find(".gform_body li.preview-area img" ).css('display','none'); | |
$form.find(".gform_body li.preview-area .demo-product:eq(0)" ).css('display','block'); | |
$form.find(".gform_body li.preview-area .demo-artwork:eq(1)" ).css('display','block'); | |
// On color swatch click/secltion | |
$form.find("li.color-picker-choice " ).click(function() { | |
var $radioIndex = $form.find("li.color-picker-choice ").index(this); | |
var $imageRef = $form.find(".gform_body li.preview-area .demo-product"); |
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
/*///////////////////////////////////////*/ | |
/* Outter form wrapper */ | |
.gform_body { | |
background:#f6f6f6; | |
border-radius:10px; | |
margin-bottom:40px; | |
overflow:hidden; | |
padding:50px 0px; | |
} |
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
<img class=”product” src=”https://yourwebsite.com/link_to_your_image/my_image1.png“/> | |
<img class=”product” src=”https://yourwebsite.com/link_to_your_image/my_image2.png“/> | |
<img class=”product” src=”https://yourwebsite.com/link_to_your_image/my_image3.png“/> | |
<img class=”product” src=”https://yourwebsite.com/link_to_your_image/my_image4.png“/> |
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
/*/////////////////// | |
JS | |
Build a simple product visualiser with Gravity Forms Color Picker | |
Full article at https://jetsloth.com/labs/build-a-simple-product-visualiser-with-gravity-forms-color-picker/ | |
////////////////////*/ | |
<script type="text/javascript"> | |
jQuery(document).bind('gform_post_render', function(e, formId, currentFormPage) { | |
// Hide all the product images | |
jQuery( ".gform_body li.preview-area img" ).css('display','none'); |
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
/*/////////////////// | |
CSS | |
Build a simple product visualiser with Gravity Forms Color Picker | |
Full article at https://jetsloth.com/labs/build-a-simple-product-visualiser-with-gravity-forms-color-picker/ | |
////////////////////*/ | |
/* Outter form wrapper */ | |
.gform_body { | |
background:#f6f6f6; | |
border-radius:10px; |
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
/* | |
Gravity Forms Image Choices - Custom Style - Floating | |
Find out more at | |
https://jetsloth.com/support/gravity-forms-image-choices/custom-styles-floating/ | |
*/ | |
.gform_wrapper .image-choices-field { | |
display: block; | |
max-width: 640px; | |
width: 100%; | |
} |
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
@media only screen and (max-width: 641px) { | |
.image-choices-field:not(.image-choices-show-labels) .image-choices-choice-text { | |
display: none !important; | |
} | |
} |