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

    The 'Form Select' dropdown list in the Formit CMP is empty, even though I have at least 5 different forms. I cannot select any. Should I enter some value for a variable in the systems settings?

    Tnx for your help

    Ludo

    This question has been answered by omegerard. See the first response.

      • 17301
      • 932 Posts
      Have you given your form names in the formit call with formName=`Form 1` and also included the FormItSaveForm hook ?

      https://docs.modx.com/extras/revo/formit/formit.hooks/formit.hooks.formitsaveform [ed. note: lkfranklin last edited this post 5 years, 11 months ago.]
        ■ 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.
        • 22197
        • 40 Posts
        Quote from: lkfranklin at Apr 23, 2018, 11:12 AM
        Have you given your form names in the formit call with forName=`Form 1` and also included the FormItSaveForm hook ?

        https://docs.modx.com/extras/revo/formit/formit.hooks/formit.hooks.formitsaveform
        Thanks for your help.
        Yes, I did.
        I see the the form entries listed underneath the 4 'Select' entries (context, form, start date, end date). I can select context, but not form. Its list is empty (though the list of entries is not).
        Ludo
        • discuss.answer
          • 22197
          • 40 Posts
          Quote from: omegerard at Apr 23, 2018, 11:04 AM
          Hi

          The 'Form Select' dropdown list in the Formit CMP is empty, even though I have at least 5 different forms. I cannot select any. Should I enter some value for a variable in the systems settings?

          Tnx for your help

          Ludo

          I seem to have found the cause for this weird behaviour.

          This is what the modx error log had to say:


          [2018-05-03 10:48:41] (ERROR @ /var/www/html/core/xpdo/om/xpdoobject.class.php : 240) Error 42000 executing statement:
          Array
          (
          [0] => 42000
          [1] => 1055
          [2] => Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'modxforgipso.FormItForm.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
          )


          I went into mysql and entered the following command


          mysql > SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

          Problem solved.

          For those who might be served by this solution.

          For the others, does anybody know what this sql_mode is all about?

          Regards

          Ludo