Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Getting value from url

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

    What is the related echo?

    Edward
    #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 Moderator
    #51948

    And what does that output to the page right now?

    Edward
    #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 Moderator
    #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));
    
    Edward
    #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…?

    Edward
    #52073

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

    Trevor Moderator
    #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.

    Edward
    #52077

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

    Trevor Moderator
    #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)

The forum ‘Search & Filter Pro’ is closed to new topics and replies.