We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43592
    • 97 Posts
    Hi forum,

    Ive a question according to pdoressource and filters. Im not sure if I think in the right way_

    The first select which works over pdoRessources should list the options of the second select. The second select should always have the child ressource pagetitles of the selected option of the first list field.
    Im not sure if this needs ajax or is somehow possible easier.
    A code example would be great, Ive no idea how to solve that, maybe also total other idea.

      <div class="form-group">
                      <div class="row">
                        <div class="col-sm-6">
                          <label>[[++Startort]] <span class="help">i</span></label>
                          <select class="form-input select-filter" data-minimum-results-for-search="Infinity">
                            [[!pdoResources:ifempty=``? &parents=`55` &where=`{"template:=":1}` &tpl=`tpl_standort` &sortby=`{"menuindex":"ASC"}` &includeTVs =`` &limit=`25` &select = `{"modResource":"id,pagetitle"}` ]] 
                          </select>
                        </div>
                        <div class="col-sm-6">
                          <label>[[++Partner]]</label>
                          <select id="second" class="form-input select-filter" data-minimum-results-for-search="Infinity">
                            <option>Hotel XY</option>
                          </select>
                        </div>
                      </div>
    
    


    Thanks in advance!
      • 17301
      • 932 Posts
      If I understand what you're trying to do correctly (filter resources by a select or multiple selects?) then you may want to actually look into advsearch rather than pdoresources.
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.