We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46580
    • 167 Posts
    Where may I find a tutorial explaining how to populate front end form fields retrieving data with xPDO ?

    select list > get value from spec. table

    auto-suggest/complete fields > get value get value from spec. table and allow new data creation if value doesn't exist.

    I guess FormIt2db extra is designed to do that.

    Additionally I'd like to add auto-suggest feature to a front-end form (like smart tagging) with retrieved values. [ed. note: johnxx last edited this post 12 years, 2 months ago.]
      MODX lover
      -
      Développeur MODX / Webdesign / Solutions web
      • 40045
      • 534 Posts
      It's all about fetching the right data and outputting it to your JS in the frontend in the format it needs...

      $objs = $modx->getCollection('yourObject', array('query' => 'value'));
      $output = array();
      
      foreach ($objs as $obj) {
          // do something, e.g. prepare an output array 
          $output[] = $obj->get('field');
      }
      
      return json_encode($output, true);
      


      but without further information about what exactly you try to do and what JS components you use in the frontend it's difficult to help.