The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Foreign Key Relationship
I have 9 forms that contain various bits of data. Each form has a RosterID field. How to I link all the forms together [foreign key] using the RosterID field?
I looked at the Dynamic field but I can't see where I would create a foreign key to link the forms. I see were it is a connection to display a specific field but that is not a relational link for two tables.
Here is a direct link to what I am trying to do, the red tabs are the forms/tables that need to be related via the RosterID field. https://aableh.net/ussvi/member-information/
I have been trying to get this to work for a week now without any success. Please help.
November 27, 2018 at 5:48 am
Neither WordPress nor Formidable follows the relational concepts you would embrace if you were designing your own table structures. Formidable follows the WordPress model by using two tables to store its entry data. It's basically a header record in one table related to all the field data for a specific entry in another table. Each field is saved in its own row.
The fact that you're using 9 forms really complicates things. It would have been much easier to create a single form with a tabbed interface than to use 9 forms. What you need to do is figure out how to pass the roster id as a variable to the individual forms. Displaying the resulting data is going to be complex as well. I did something similar for a Federal Government site I was called in to fix after another dev couldn't figure it out. It was very time consuming and required a lot of effort.
If you're interested in pursuing the tabbed form option, here's a tutorial: https://victorfont.com/formidable-pro-tabbed-form-sample/
By the way, I lived a town over from Groton for 3 years and made a lot of friends on the sub base while I was there. I admire them for their sacrifices and service. Thank you, if you served.
November 27, 2018 at 5:54 am
By the way, I'm not using the plugin mentioned in the tutorial any longer. I use the jQuery tabs already supplied with WordPress. I just haven't updated the tutorial yet.
November 27, 2018 at 7:58 am
Thank You. I was thinking I might have to rethink my approach. I will look at your suggestions. I served on the USS Archerfish (SSN-678) and the USS Glenard P. Lipscomb (SSN-685). I was asked by the United States Submarine Veterans Inc. to redesign their website and database functions. I am doing this all on a voluntary basis for the good of the order. I looked around for a database solution that would work within WordPress and I'm hoping I made the right choice with Formidable Forms.
November 27, 2018 at 9:43 am
Do you have any leads for me on how to implement the jQuery tabs in WordPress?
November 27, 2018 at 10:28 am
The code in the article explains how to do it. Essentially, you add the tab code to the form's customize HTML area under settings. I've found it easier to place the related fields in sections that place each section in a tab.
The jQuery Tabs addon is already registered in WordPress. You only have to enqueue it in your functions file. wp_enqueue_script('jquery-ui-tabs', '', 'jquery')
Use this as your guide: http://jqueryui.com/tabs/
Discussion closed.