Menu

Not all fields showing up in admin

Help
tmac
2007-03-19
2013-06-03
  • tmac

    tmac - 2007-03-19

    I added a field to a table I'd created for a phpform AFTER I created the form.  The admin portal won't show that field for some reason, even though it shows a bunch of other fields that weren't even part of the form.

    The query the admin/index.php is running should be grabbing every field, but it's not.

    Any ideas?  I tried resetting the query cache in phpmyadmin, and I'm not sure it flushed it, but whatever happened, it didn't make a difference.

    Thanks for any ideas you might have.

    tmac

     
    • TNTEverett

      TNTEverett - 2007-03-19

      The Admin will not show fields that were not setup as part of the form.  If it is then you may be accessing a db that is a combination of other forms or programs.  It is best not to use the same db for multiple forms or programs unless you are absolutely sure you know what parts of the db are being used for each form or program. 
      Programs only do what they are programmed to do.  If the program is faulty, the results will also be faulty. 
      When you add a field to a program after the creation of the form you will need to follow through with changes to the process.php and the admin/index.php files.  Beacuase you started with manual changes you must finish with manual changes until you have correctly added all that is necessary.  Since we don't know exactly what you have modified it would be impossible to tell you where to look for the problems you are having. 

      The admin does it's best to determine the following;
      1.) The number of db entries in a table, usually indexed by number in an SQL db. 
      2.) The number of fields per entry.
      The admin will then display the fields per entry in a table.

      Suggestions:
      1.) Identify the db table, and entries in your current db. 
      2.) Correlate all these to your form entries, and then follow up by correlating the entries in the process.php file. 
      3.) Find the db access function in the process.php file and make sure all form data is entered into the db. 
      4.) Double check this using your phpmyadmin to browse the db. 
      5.) If all of these steps are operating correctly then you will be stuck debugging the admin/index.php to see why it skips your new db entries. 

      These problems should not occur if you start from scratch and add the form data using the phpFormGenerator.  This would be one way to get a working admin.  You could do this using another form name but keeping the same db names.  When you get it working you should be able to see the db data immediately in the admin without using the form.  You can then copy the new admin into your old form folders. 

      FYI, keep an eye out for the next major revision of phpFormGenerator.  Adding/Deleting fields in any form you create is a new feature. 

       
    • tmac

      tmac - 2007-03-20

      Thanks for the tips.  I'm looking forward to the revision - adding fields by hand is a bit of a pain and not always wholly successful.  Luckily, the admin is the only thing I've had any issues with.

      Thanks.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.