Is there a way to get a list of cms tables that already exist?

3 posts by 2 authors in: Forums > CMS Builder
Last Post: September 18, 2012   (RSS)

By garyhoffmann - September 17, 2012

I've been doing this for several years now with text fields, but would like to use a drop-down if it's possible. Keep in mind, this is all referencing the admin area - I already have it all worked out in the presentation of the site.

Our scenario: I have a "form information record" which includes general information about the form (form name, what should happen when a user submits it, etc.). I also create a section called form fields in which the user lays out their form (record with keys of FirstName, LastName, etc.).

In my form info section, I have a field called form_fields_section_name in which the user has to type the name of the table (minus the cms_ prefix).

I'm wondering if there is a way to get a drop down list of all the tables in the database - I could use SHOW TABLES LIKE 'cms_%' but then I get the cms_ portion of the name back. I'm wondering if there is a "cms friendly" way to get the table names back?

Thanks,
Gary.

Re: [greg] Is there a way to get a list of cms tables that already exist?

By garyhoffmann - September 18, 2012

Works perfectly!!!

Thanks so much - I will begin replacing all instances of my entry fields with this - it will be very nice. I have this concept in literally 10-15 places throughout my "normal" site setup. This will be so nice.

Gary.