• Resolved afassas

    (@afassas)


    I am trying to create a reusable form (version 2.13.25) that can be used for trip registrations for our club. I would like to populate a MySQL database on the webhost with information about each new trip and its options, such as types of room accomodations. This would allow me to setup a new trip for registration by merely updating the MySQL database with the new trip name and options.

    This is my first use of Form Maker “From Database” value populating. I have successfully created a separate MySQL database and populated the table “trip_info” with rows of data, such as “trip_name”, etc. I have also successfully been able to have the new form draw its selection options for “trip_name” from the remote database. So far so good. Database created, check. Database connected, check. First “From Database” lookup, check.

    My problem comes with wanting to be able to select a “room_type” for my “room_type” field, by using a “From Database” lookup that is dependent upon which “trip_name” was selected in the previous field. I am not seeing in the documentation or support forum any answers to how to accomplish this. I was hoping that I might be able to use a WHERE “trip_name” = {2} (where {2} is the previous “trip_name” selection) or similar syntax, but that does not seem to be working.

    To confound me further, there does not appear to be anyway to edit a previously created “From Database” field option.

    Please be aware that my use case involves multiple trips, with different room type descriptions from trip to trip, so setting up Conditional Fields does not seem to be a valid option and would negate the power of trying to build a multi-use form.
    Example:
    Trip 1
    room type 1
    room type 2
    room type 3
    Trip 2
    room type 2
    room type 4
    room type 5
    Trip 3
    room type 6
    room type 7
    The same form is intended to be used for Trip 1, Trip 2, Trip 3, but needs to present different room type options, based upon which Trip is selected in the form.

    Any help on this challenge is appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Zhanna Khachatryan

    (@zhannak)

    Hello @afassas,

    Thanks for your inquiry and sorry for the late response.

    Dear user, first of all I want to tell you that you are using a quite old version of form maker, please update it.

    As for the options from database, please see the screenshot https://nimb.ws/1dSCJ8. If you have add this way and it doesn’t work, please update the plugin and check again.

    If after update it’ll still not work then please contact our support team using the following form as you are a Premium version user and at WordPress forum we answer only free version related questions.

    Thread Starter afassas

    (@afassas)

    Zhanna,
    Thank you for your reply.

    I did not think that version 2.13.25 was that far out of date. The Form Maker plugin was just updated on my WordPress site less than 2 weeks ago. I have gone ahead and updated to 2.13.26.

    After updating Form Maker to 2.13.26, I tried your suggestion as outlined in the screenshot you shared. While the UI allows me to enter a WHERE lookup using the parameter {2}, which is my form field “Trip Name”, which matches a field/column in my MySQL table, the form preview (in a separate preview browser window) did not populate with matching info from my selected field, “room_type”. The form choices were blank.

    I should mention that my WordPress site is running version 4.9.13. The latest WordPress version available is 5.3.2. I have not yet made the move to 5.x.

    Since I am using the Premium version of the plugin, I will follow up via the Support Form as you suggested, rather than the forum.

    Alex

    Plugin Support Zhanna Khachatryan

    (@zhannak)

    Hello Alex,

    Sorry I have misread 2.3.25.

    Great Alex, please reach the support team with a form and they’ll do their best to help you ASAP.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use field 1 choice as lookup for field 2 database lookup’ is closed to new replies.