We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13473
    • 28 Posts
    Hi I have the ajax search in non-ajax mode in the top of my template.

    On one of my pages I would like to create a simple search form with two drop downs and a submit button......

    I would like the search to only search within the template variables I have setup .... interim_location and specialism. I have 8 locations and 6 specialisms. Is it possible to do this with non ajax and if so could anyone guide me in how I would set up the form......Even better if one location could be selected and maybe two or more specialisms.... can the form populate from the tv variables?

    I hope this make sense ?

    Any help much appreciated.

    James

      • 5811
      • 1,717 Posts
      May be tvExplorer is more appropriate, have a look here -> http://modxcms.com/forums/index.php?topic=30743.0
        • 13473
        • 28 Posts
        Thank you thankyou thank you...... I am getting on well with this...... Just one question I am using global css classes to format my forms. Within the form I now have is there anyway to format the label and dropdown. i,e select class="selectclass" etc etc. Any help much much much appreciated.

        <form method="get" action="[~[*id*]~]"><fieldset><legend>Find an Interim Near You</legend>
        <p> [+tve.interim_location:filter->9:label->Your Location:tvtype->dropdown+]</p>
        <p>[+tve.specialism:filter->9:label->Required Specialism:tvtype->dropdown+]</p>

        <p class="submit"><input type="submit" name="search" value="Search" class="formInputButton"/></p></fieldset>
          • 11975
          • 2,542 Posts
          Hi,

          about output fomatting for form elements, you should be able to do whatever you want with tvExplorer.

          Try first by adding class->selectclass
          in
          [+tve.interim_location:filter->9:label->Your Location:tvtype->dropdown+]
          which gives
          [+tve.interim_location:filter->9:label->Your Location:tvtype->dropdown:class->selectclass+]


          This should do the trick

          :-)
            Made with MODx : [url=http://www.copadel.com]copadel, fruits et l