We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I made a slight change to the FlexSearchForm to improve validation:

       // $xhtmlStrict [ true | false ]
       // If you want this form to validate as XHTML Strict compliance, then
       // this needs to be true, but IE has a fieldset bug that I don't know
       // a workaround for. So you can set this to false to avoid it.
       $xhtmlStrict = (isset($xhtmlStrict))? $xhtmlStrict : true;
    


    This way it validates by default; if you have a problem with the IE fieldset bug you can set it to ’false’ in the snippet call.

    [[FlexSearchForm?... &xhtmlStrict=`false`]]
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 4095
      • 372 Posts
      To make FlexiSearch validate against Cynthia (WCAG) you need to include the label reference, if you replace the code around line 291 to 293 with the following code it will validate although with a warning about using implicit labels.

        $SearchForm .= '<label><input class="FSF_input" type="text" name="search" value="'.$searchBoxVal.'"  ';
        $SearchForm .= ($boxText)? 'onfocus="this.value=(this.value==\''.$boxText.'\')? \'\' : this.value ;" />' : '/></label>';
        $SearchForm .= '<label><input class="FSF_submit" type="submit" name="sub" value="'.$searchButtonText.'" /></label>';


      Might come back to this another day and see if I can make a better solution or maybe someone already has one?

      Cheers.
        [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
        Admin Sandbox Login: sandbox Password: castle