This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Can you change the field names in the table.....


  1. deejay
    Member

    I did my first form and I have to say, this is great software! The table the installation generates puts the name "element_X" for the field name. I have two questions regarding the field name:

    1. Is there anyway to change this option so you can choose the field names when setting up?

    2. Can I change the field names to integate into my exisiting custom table?

    Thanks in advance for any help!

    Posted 14 years ago #
  2. yuniar

    I'm afraid it won't be possible to modify the form field names and table. MachForm uses those names to be able processing your forms correctly.


    MachForm Founder

    Posted 14 years ago #
  3. deejay
    Member

    Thanks for your reply. I finally realized that. I would like to use the machform to insert the data through the form into my existing database because I want to do a custom search and display certain results in html.

    I figured out how to do the search and display the ap_form table data into html. The problem I ran into is when I import a csv file into the ap_form table to populate, it takes the text fields in my csv file and changes them to the numeric equivalent of the element option I used for the drop down box when creating the form. Any way to change this other than making all the fields to text?

    I hope this makes sense as I am a newbie to PHP and MySql. Thanks again for any help!

    Posted 14 years ago #
  4. yuniar

    Hmm.. how did you import the csv file? Using PHPMyAdmin?

    If your form has dropdowns, you need the import into two tables. One is "ap_form_x" (x is your form id number) and second is "ap_element_options"

    "ap_element_options" is where you store your dropdown text/labels, while the number being stored in "ap_form_x" is the index number which refer to "ap_element_options" table.

    Both are relational tables.
    So the dropdown labels is being stored in "ap_element_optins", while the selected index is being stored in "ap_form_x" table.

    I hope I'm explaining this clearly.


    MachForm Founder

    Posted 14 years ago #
  5. deejay
    Member

    Yes, I imported it through phpMyAdmin but some of the fields imported are "funky". I am going to look into it more today. It was probably something that I did. Thanks for your help. I am very impressed with the product and the support you give here. :)

    Posted 14 years ago #
  6. startagl
    Member

    Using phpMyAdmin do a select query to inner join the two tables together and get the information as an output. Then import that information into your database.

    Posted 14 years ago #

RSS feed for this topic

Reply