The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Change Form ID - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Change Form ID (/showthread.php?tid=238) |
Change Form ID - walkingby - Aug 11th, 2009 I have a fairly unique situation. I need the ability to change one form ID (ei ft_form_1) in my database to something more "definitive." The site owner wants the ability to update this specific form via Form Tools. (since this is what he's used to using.) The data being stored is being used by another script within the same database. A bit complex to explain...but essentially, the client will use Form Tools to manage the data, and the other script will pull from that table. So... the table in Form Tools needs to match the other scripts queried name. Typically, I'd simply change the query in the other script to match Form Tools (ft_form_1) ...but this isn't an option in this particular situation. Is this a possibility? Thanks so much! Hope my question was clear enough! Brian RE: Change Form ID - Ben - Aug 16th, 2009 Hey walkingby, Drat, didn't realize I missed your post. Neat problem... so I guess there's no way to modify that other script to accept a different database table name? Probably not, I suppose. Unfortunately, Form Tools has a similar requirement: the form table names MUST be named like that: [prefix]form_[form ID]. All of the code relies on that, so changing it would require a fairly large overhaul of the script. One option would be to create a duplicate of the Form Tools form table and grab the data from that. This may not work depending on your requirements, but you could rig up a simple cron job to automatically purge the new database and re-input all the current form tools data, say every day or hour or something. This isn't too tricky to get up and running, actually - the SQL is quite simple. Other than that I don't have much to suggest... but good luck! Ben RE: Change Form ID - walkingby - Aug 17th, 2009 Thanks so much for the response Ben. I ended up creatively working this out...and things seem perfect so far! (Aug 16th, 2009, 10:57 AM)Ben Wrote: Hey walkingby, |