Forums

Autogenerated Code--Is there any way to modify this?

garmungo 31 May, 2010
Hi--I recently started using chronoforms and so far it is awesome. My ONE problem is that I created a form, connected it to a database, then later decided I wanted more fields. So, I added the fields, but now the "Autogenerated Code" only saves the first few fields.

I am fairly good with PHP, and can modify the autogenerated code easily to get the new fields to be saved, but the problem is that it gets overwritten each time (as they warn me it will in the "Hint:" bar). My question is this--short of deleting and recreating my table and hoping this will adjust the auto-code, is there any way for me to have my OWN code that saves the data to a database?

I hope I'm not missing an obvious solution and wasting everyone's time--Thanks in advance for any help.
nml375 31 May, 2010
Hi,
First off, it's not the Autogenerated Code you need to update, but the dbclasses one (not shown anywhere in the form management). This is a fairly easy task though; simply head to the DB Connections tab, disable the connectons, press apply, re-do the connection, and save/apply. The new fields should be stored properly now. You don't need to delete or re-make your database table..

Now, for other tasks, you can use the "On Submit - before email", "On Submit - after email", and "Serverside Validation" to run custom PHP-code at various points in the workflow.

/Fredrik
garmungo 01 Jun, 2010
Sweet I'll try it out. Thanks for your help!
This topic is locked and no more replies can be posted.