Appnitro Software Forums » MachForm

Retrieving Dropdown Values

(6 posts)
  • Started 2 months ago by andylooney
  • Latest reply from andylooney

  1. Hi, I have spent the week and 30+ hours trying to retrieve the dropdown values from mach form mysql tables and to display them on a table on my website. I have read the posts explaining how to do a left join, i have learned about joins on my own, etc. I have even tried to write my way around this problem -but to no avail. I'm am finally frustrated enough to ask for help.
    Basically, I am using machforms as a tool for my employees to enter in data about various local companies. After they enter that data, it is stored in a mysql database.
    I then have a form on my website that consists of a dropdown menu, a checkbox array, and a submit button. A visitor to my site is supposed to be able to select a county from the dropdown and a type of company from the checkbox array. Then this posts to a script which hunts for the matching listings in the machforms databse and displays relevant results in a table.
    Since most of the data is entered in machforms through dropdown boxes, the hard part is getting my php script to query the machforms database correctly. I have connected a few times -but cannot get this to work correctly. HELP!

    Posted 2 months ago #
  2. You can use these SQL code to get drop down value from mysql :

    select
          A.*,
          B.option as element_6_value,
          C.option as element_7_value
      from
          (ap_form_271 as A
           left join ap_element_options as B
                  on A.element_6=B.option_id and B.element_id=6 and B.form_id = 271)
           left join ap_element_options as C
                  on A.element_7=C.option_id and C.element_id=7 and C.form_id=271

    You need to change the form id and element id in there with yours. For further information, you can see to these post :

    http://www.appnitro.com/forums/topic/drop-downs-and-mysql?replies=11

    Posted 2 months ago #
  3. Yeah, i found that post and the other one like it,but i can't seem to get that to work either.

    Posted 2 months ago #
  4. Hi Andy,

    Can you send us your current code please?
    Also, let us know the URL to your form as well.

    Please send to: customer.service [at] appnitro.com
    We'll help you there.

    Posted 2 months ago #
  5. Okay, thanks!

    Posted 2 months ago #
  6. You guys got it! Thank you sooo much!

    Posted 1 month ago #

RSS feed for this topic

Reply

You must log in to post.