• Resolved fana123

    (@anaf123)


    Hi,

    I am trying to use the Conditional Fields Pro Repeater as well as the Recordset, read from database, that you have provided. It works for the first drop down (lists some categories) and then when I add in another one the fields no longer show. I am quite inexperienced with web development in general so any help is appreciated.
    Thanks!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @anaf123

    Our plugin cannot fill fields that do not exist. If the fields are generated at the runtime, you must fill their values manually.

    For example, you can insert the following piece of code in the form’s content:

    <script>jQuery(document).on('click', '.wpcf7cf_add', function(){
        jQuery('.wpcf7cf_repeater_sub:last select').html(jQuery('.wpcf7cf_repeater_sub:first select').html());
    });</script>

    Best regards.

    Thread Starter fana123

    (@anaf123)

    Okay that makes more sense thank you!

    Would you be able to give me some direction on how to fill the drop downs with different sql queries? or another set of values data withinthe imported recordset?

    For example. If the first drop down selects “CATEGORY 1”.. the second dropdown will display ITEMS of TYPE: CATEGORY 1

    Would I have to import and store the data somewhere so that i can reference it at runtime to fill each repeatear element?

    Plugin Author codepeople

    (@codepeople)

    Hello @anaf123

    You can use fields values for filtering others.

    For example, assuming you have the recordset tag with id="data" and the dropdown menu menu_1 whose choices values corresponds to the elements in column_a in the table table_name (the fields, columns, and table names are hypothetical, used only to describe the process).

    Now, you want fill another dropdown menu (menu_2), with the elements in column_b, where column_a match with the item selected in menu_1.

    You can insert a cf7-link-field tag with the structure:

    [cf7-link-field recordset="data" field="menu_2" value="column_b" text="column_b" condition="record['column_a'] == '{field.menu_1}'"]

    There are multiple examples in the following link:

    https://cf7-datasource.dwbooster.com/examples

    Best regards.

    Thread Starter fana123

    (@anaf123)

    Thank you for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using Repeater & Recordset from database in tandem’ is closed to new replies.