• With this plugin, I was able to do a quick calculation and filtering. The end result is that I have a form with max entries base on count results (how many choose same option in Radio) along with another filter (how many of them has the status of “x” as approved”). Rendering results in JS … no .. just have a look:

    time_1100 = <?php echo do_shortcode('[gravitywp_count formid="71" filter_field="65" filter_value="11:00" filter_field2="40" filter_value2="Approved" thousands_sep="," ]'); ?>;
    time_1115 = <?php echo do_shortcode('[gravitywp_count formid="71" filter_field="65" filter_value="11:15" filter_field2="40" filter_value2="Approved" thousands_sep="," ]'); ?>;
    time_1130 = <?php echo do_shortcode('[gravitywp_count formid="71" filter_field="65" filter_value="11:30" filter_field2="40" filter_value2="Approved" thousands_sep="," ]'); ?>;
    time_1145 = <?php echo do_shortcode('[gravitywp_count formid="71" filter_field="65" filter_value="11:45" filter_field2="40" filter_value2="Approved" thousands_sep="," ]'); ?>;
    time_1200 = <?php echo do_shortcode('[gravitywp_count formid="71" filter_field="65" filter_value="12:00" filter_field2="40" filter_value2="Approved" thousands_sep="," ]'); ?>;
    time_1215 = <?php echo do_shortcode('[gravitywp_count formid="71" filter_field="65" filter_value="12:15" filter_field2="40" filter_value2="Approved" thousands_sep="," ]'); ?>;
    time_1230 = <?php echo do_shortcode('[gravitywp_count formid="71" filter_field="65" filter_value="12:30" filter_field2="40" filter_value2="Approved" thousands_sep="," ]'); ?>;
    time_1245 = <?php echo do_shortcode('[gravitywp_count formid="71" filter_field="65" filter_value="12:45" filter_field2="40" filter_value2="Approved" thousands_sep="," ]'); ?>;
    time_1300 = <?php echo do_shortcode('[gravitywp_count formid="71" filter_field="65" filter_value="13:00" filter_field2="40" filter_value2="Approved" thousands_sep="," ]'); ?>;
    time_1315 = <?php echo do_shortcode('[gravitywp_count formid="71" filter_field="65" filter_value="13:15" filter_field2="40" filter_value2="Approved" thousands_sep="," ]'); ?>;
               
    //gchoice_71_65_0
    
    			$( "#input_71_65 .cat_time" ).remove();
    			$( "#input_71_65 label" ).prepend('<div class=cat_time><i class="fa fa-clock-o"></i></div> ');
    			$( ".cat_cout" ).remove();
    			
    			
    			$( ".gchoice_71_65_0 label" ).append( $( "<div class=cat_cout><i class='fa fa-user'></i> "+ time_1100 +"</div>" ) );
    			$( ".gchoice_71_65_1 label" ).append( $( "<div class=cat_cout><i class='fa fa-user'></i> "+ time_1115 +"</div>" ) );
    			$( ".gchoice_71_65_2 label" ).append( $( "<div class=cat_cout><i class='fa fa-user'></i> "+ time_1130 +"</div>" ) );
    			$( ".gchoice_71_65_3 label" ).append( $( "<div class=cat_cout><i class='fa fa-user'></i> "+ time_1145 +"</div>" ) );
    			$( ".gchoice_71_65_4 label" ).append( $( "<div class=cat_cout><i class='fa fa-user'></i> "+ time_1200 +"</div>" ) );
    			$( ".gchoice_71_65_5 label" ).append( $( "<div class=cat_cout><i class='fa fa-user'></i> "+ time_1215 +"</div>" ) );
    			$( ".gchoice_71_65_6 label" ).append( $( "<div class=cat_cout><i class='fa fa-user'></i> "+ time_1230 +"</div>" ) );
    			$( ".gchoice_71_65_7 label" ).append( $( "<div class=cat_cout><i class='fa fa-user'></i> "+ time_1245 +"</div>" ) );
    			$( ".gchoice_71_65_8 label" ).append( $( "<div class=cat_cout><i class='fa fa-user'></i> "+ time_1300 +"</div>" ) );
    			$( ".gchoice_71_65_9 label" ).append( $( "<div class=cat_cout><i class='fa fa-user'></i> "+ time_1315 +"</div>" ) );

    Yes i know that i can youe functions and loops in php …. above was 5 minutes

  • The topic ‘Amazing’ is closed to new replies.