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

    I have a simple form on a page which uses pixelchutes eform2db snippet in conjunction with eForm to stuff newsletter subscriber email addresses into a custom table within my modx database. however i also want a simple page to just display these email addresses.

    i had thought that creating a TV with a @SELECT command and a DataGrid would do the trick. However i can’t get it to work but i’m sure i’m just being a doofus! Here’s what i’ve set up in the TV:

    Input type: Text
    Default Value: @SELECT Email, DateAdded FROM custom_subscriber_data
    Widget: DataGrid

    The page does display the datagrid with the column headers as specified in the widget properties. there are no modx errors, but the table is empty, no rows returned. there is definitely data in the table and the sql query is correct. so i’m guessing that i’ve got the TV set up badly?

    Any ideas what i’m doing wrong?!

    Thanks huh

    UPDATE: All sorted now ... i was not aware that you have to specify the data type in the Column type property of the datagrid
      • 14795
      • 7 Posts
      I’m having the same problem.

      I only have one field in my table and it is an integer, so in Column Types I’ve just got "Integer". The table heading appears and there are two cells below it that just have a 0 in them (there are also only 2 rows in the table).

      Any help would be greatly appreciated!