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

    I have successfully set up A CMP with a MigXdb grid that displays data from a custom package. All is working as expected (add, edit, delete of records etc), except that our TV's are not validating as expected when the done button is clicked (despite us specifying that a blank value should not be accepted in the TV). This means that fields that should be a requirement are not being completed, the user will not be informed of the error and empty values are being entered in our tables. I would also like to process one of the table field values (an id integer) to be entered automatically on submission 'behind the scenes' without any involvement of the user.

    Having searched the forums I have found this post: https://forums.modx.com/thread/82862/migxdb-validate-custom-tvs which details the issue to some degree and I understand that I need a custom processor to check for these empty values and return an error on form submission. However this seems to be referencing an example setup that we have not implemented (childresources). We have just build our MigxDb implementation directly based on the gallery management example.

    Is there anywhere I can read about about implementing a custom processor when the form data is saved? Or is there anyone that can give me a brief explanation as to what I should be doing to check these values have been filled before they are submitted to the db.

    Thanks in advance for any assistance.
      • 4172
      • 5,888 Posts
      There is now simple validation for each field (just required for now),
      working with the default MIGXdb - update-processor

      https://github.com/Bruno17/MIGX/blob/master/packages/migx-2.5.11-pl.transport.zip

      In the Formtabs-field (MIGX-configurator) put 'required' into 'Validation' to all required fields [ed. note: Bruno17 last edited this post 12 years, 10 months ago.]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 28432
        • 372 Posts
        Hi Bruno,

        I've put "required" in the "Validation" field and i doesn't work.
        I know is an old post.

              "fields":[
                {
                  "MIGX_id":3,
                  "field":"name",
                  "caption":"Nom du carrousel",
                  "description":"Ajouter un nom facilite la gestion.",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"",
                  "validation":"required",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "useDefaultIfEmpty":"0",
                  "pos":1
                },


        Is this work normally ?
        Best regards.
          • 4172
          • 5,888 Posts
          there was a change in Revo 2.4
          This should work again, since this:
          https://github.com/Bruno17/MIGX/commit/0ebceb1301e28efd65f440371bcca2539a0b9bd1

          its included in this beta-version (2.10.0-beta-4):
          https://github.com/Bruno17/MIGX/commit/fda590127a26c015841df1a2b68d4c387e82c1fe
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!