• Resolved jamalissimo

    (@jamalissimo)


    Hello team,

    I really like your work and your plugin is very useful for my project. I am having one issue though. I have 3 registration forms on 3 different pages where I need to load different subcategories but when switching the pages, the field contestant_subcategory__1 is not refreshed. There seems to be some sort of cache? The contestant_subcategory__1 field has the same name in all 3 registration forms but record-sets and link-fields have different ids per form.

    This is the code I am using:

    [cf7-recordset id=”contest-set-solo” type=”database” query=”SELECT * FROM wp_contest WHERE active=1 AND DATE(to) > CURDATE()”]

    [cf7-recordset id=”subcategory-set-solo” type=”database” query=”SELECT * FROM wp_contest_subcategory WHERE active=1 AND category=1 ORDER BY sequence ASC”]

    [cf7-link-field recordset=”contest-set-solo” field=”contest” value=”ID” text=”name” limit=”1″]

    [cf7-link-field recordset=”subcategory-set-solo” field=”contestant_subcategory__1″ value=”ID” text=”name”]

    Do you have any idea what might be wrong?

    Best regards
    Roman

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

    (@codepeople)

    Hello @jamalissimo

    Thank you very much for using our plugin.

    I’m not sure about the issue because you included only one set of fields in your entry. But, if you are the same queries on different contact forms, you will have the same results.

    Which are the recordset fields in the other forms?

    Best regards.

    Thread Starter jamalissimo

    (@jamalissimo)

    Hi @codepeople ,

    Here are all registrations from all three forms. I am always getting values from the last one – subcategory-set-multiple. I think the issue could be mitigated by registering only the record set that exists on the current page and not all at once.

    /* -------------------------- FORM 1 ------------------------- */
    [cf7-recordset id="contest-set-four" type="database" query="SELECT * FROM wp_contest WHERE active=1 AND DATE(do) > CURDATE()"]
    
    
    [cf7-recordset id="subcategory-set-four" type="database" query="SELECT * FROM wp_contest_subcategory WHERE active=1 AND category=2 ORDER BY sequence ASC"]
    
    [cf7-link-field recordset="contest-set-four" field="contest" value="ID" text="name" limit="1"]
    [cf7-link-field recordset="subcategory-set-four" field="contestant_subcategory__1" value="ID" text="name"]
    
    
    [cf7-link-field recordset="subcategory-set-four" field="contestant_subcategory__2" value="ID" text="name"]
    
    /* -------------------------- FORM 2 ------------------------- */
    [cf7-recordset id="contest-set-solo" type="database" query="SELECT * FROM wp_contest WHERE active=1 AND DATE(do) > CURDATE()"]
    
    
    [cf7-recordset id="subcategory-set-solo" type="database" query="SELECT * FROM wp_contest_subcategory WHERE active=1 AND category=1 ORDER BY sequence ASC"]
    
    [cf7-link-field recordset="contest-set-solo" field="contest" value="ID" text="name" limit="1"]
    
    
    [cf7-link-field recordset="subcategory-set-solo" field="contestant_subcategory__1" value="ID" text="name"]
    
    /* -------------------------- FORM 3 ------------------------- */
    [cf7-recordset id="contest-set-multiple" type="database" query="SELECT * FROM wp_contest WHERE active=1 AND DATE(do) > CURDATE()"]
    
    
    [cf7-recordset id="subcategory-set-multiple" type="database" query="SELECT * FROM wp_contest_subcategory WHERE active=1 AND category=3 ORDER BY sequence ASC"]
    
    [cf7-link-field recordset="contest-set-multiple" field="contest" value="ID" text="name" limit="1"]
    [cf7-link-field recordset="subcategory-set-multiple" field="contestant_subcategory__1" value="ID" text="name"]
    [cf7-link-field recordset="subcategory-set-multiple" field="contestant_subcategory__2" value="ID" text="name"]
    [cf7-link-field recordset="subcategory-set-multiple" field="contestant_subcategory__3" value="ID" text="name"]
    
    
    [cf7-link-field recordset="subcategory-set-multiple" field="contestant_subcategory__4" value="ID" text="name"]
    Plugin Author codepeople

    (@codepeople)

    Hello @jamalissimo

    I’ll try to describe your issue with the following form:

    [cf7-recordset id="contest-set-multiple" type="database" query="SELECT * FROM wp_contest WHERE active=1 AND DATE(do) > CURDATE()"]
    
    [cf7-recordset id="subcategory-set-multiple" type="database" query="SELECT * FROM wp_contest_subcategory WHERE active=1 AND category=3 ORDER BY sequence ASC"]
    
    [cf7-link-field recordset="contest-set-multiple" field="contest" value="ID" text="name" limit="1"]
    
    [cf7-link-field recordset="subcategory-set-multiple" field="contestant_subcategory__1" value="ID" text="name"]
    
    [cf7-link-field recordset="subcategory-set-multiple" field="contestant_subcategory__2" value="ID" text="name"]
    
    [cf7-link-field recordset="subcategory-set-multiple" field="contestant_subcategory__3" value="ID" text="name"]
    
    [cf7-link-field recordset="subcategory-set-multiple" field="contestant_subcategory__4" value="ID" text="name"]

    Note you are assigning exactly the sames values to the fields contestant_subcategory__1, contestant_subcategory__2, contestant_subcategory__3, and contestant_subcategory__4.

    Best regards.

    Thread Starter jamalissimo

    (@jamalissimo)

    Yeah, I know, it is on purpose :-). The problem is that it doesn’t mater on what form I am, field contestant_subcategory__1 always contains the same values. I think it is due to the fact that the field has the same name on all three forms but unfortunately, I need it this way so I can process all forms the same way

    Plugin Author codepeople

    (@codepeople)

    Hello @jamalissimo

    The plugin does not manage a cache by itself. Do you have any plugins active to manage the website cache?

    Best regards.

    Plugin Author codepeople

    (@codepeople)

    Hello @jamalissimo

    Could you please indicate the URLs to the pages that contain the forms to check the fields’ values in action?

    Best regards

    Plugin Author codepeople

    (@codepeople)

    Hello @jamalissimo

    Since you have not responded to the last entry after three months, I assume you found a solution to the cache conflict on your site, and I will mark this thread as resolved.

    Best regards.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Record set field not refreshed when using multiple forms’ is closed to new replies.