We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32931
    • 3 Posts
    I’m new to modx, so I was wondering how one would easily create forms that store values to a DB
    Does this functionality exist natively?
    huh

    I need to create registration pages for 3 classes of users

    the forms would need to accept number/string values as well as file uploads

    any advice would be much appeciated!
      • 30223
      • 1,010 Posts
      For now have a look at the eform and eform2db snippets... The successor of eForm will have this functionality built in but that’s still in development (and no, no ETA yet).

      You’ll need a bit of php and mysql knowledge to get things working the way you want.


        • 32931
        • 3 Posts
        Thanks! I’ll give it a try.
          • 10076
          • 1,024 Posts
          I tried eform2db and somehow it does not seem to do what I expected. I first looked for catalogue, found it is beeing replaced and came across an article on http://wiki.modxcms.com/index.php/Populate_eform_with_dynamic_data,which in the end linked me to eform2db. Anyway,using the the eform2db snippet and altered this line
          $dbQuery = $modx->db->insert( $dbTable, $table_prefix . 'insertTableName' );		
          in:

          	$dbQuery = $modx->db->update( $dbTable, $table_prefix . 'smash_mymail_messages'  );		
          
          (nb prefix=smash)

          and this the call(s)
          [!eForm2db!][!eForm? &noemail=`true` &tpl=`eFormMailMe` &formid=`Emailform` &eFormOnBeforeMailSent=`eForm2db` !] 


          I tried a lot of diff combinations with the "insertTableName" field, but nothing seems to be added. Pre-created the table. And inside all the fields I need.

          On Modx 9.6, Eform 1.4.4, Win XP pro SP2, FF 2, IE7, Safari for wind 3. PHP 4.4.2.
          mod rewrite disabled.

          My goal is to create an address list that is searchable. On column name EG post code or country etc. And last but not least wouldit be possible to add data in that tableover PHP admin and have it present on that site.
          Thanks, Frank.