Forums Forums Search & Filter Pro Getting value from url

Viewing 10 posts - 21 through 30 (of 46 total)
  • Trevor
    #51938

    What is the related echo?

    Anonymous
    #51940

    <?php echo $sf_current_query->get_fields_html(array("_sft_aantal_personen","_sft_arrangementstype","_sft_type_boot","_sft_type_boot_2","_sft_boot_opties"), array('show_all_if_empty' => false)); ?>

    This…

    Trevor
    #51948

    And what does that output to the page right now?

    Anonymous
    #52055

    Right now it echo’s: Aantal personen: 20 of meer personen
    Arrangementstype: BBQ

    HTML

    Aantal personen: 20 of meer personen<br><br>Arrangementstype: BBQ

    Trevor
    #52071

    I need to see the array structure to know which element to grab. This code instead of the current echo should give the array:

    print_r $sf_current_query->get_fields_html(array(), array(‘show_all_if_empty’ => false));
    
    Anonymous
    #52072

    If I use this code:

    <?php
       //Get a multiple fields values by passing an array of field names
       //replace 1526 with the ID of your search form
    	global $searchandfilter;
    	$sf_current_query = $searchandfilter->get(15)->current_query();
    	print_r $sf_current_query->get_fields_html(array(), array(‘show_all_if_empty’ => false));
    ?>

    It “breaks” the page…?

    Anonymous
    #52073

    Meaning that I only see the URL in the tab (firefox) and a blank page.

    Trevor
    #52076

    I see the error. My bad for copying and pasting. The forum has changed the quotes 🙁

    <?php
       //Get a multiple fields values by passing an array of field names
       //replace 1526 with the ID of your search form
    	global $searchandfilter;
    	$sf_current_query = $searchandfilter->get(15)->current_query();
    	print_r $sf_current_query->get_fields_html(array(), array('show_all_if_empty' => false));
    ?>

    Or, I hope that is it.

    Anonymous
    #52077

    No worries. But, I still get a blank page using this code.

    Trevor
    #52078

    This?

    <?php
       //Get a multiple fields values by passing an array of field names
       //replace 1526 with the ID of your search form
    	global $searchandfilter;
    	$sf_current_query = $searchandfilter->get(15)->current_query();
    	print_r($sf_current_query->get_fields_html(array(), array('show_all_if_empty' => false)));
    ?>
Viewing 10 posts - 21 through 30 (of 46 total)