How to add a selector to each record in a CF7 connection

different_greyhead 02 Nov, 2020
1 Likes
HI,

Slowly getting my head wrapped around CF7. I finally figured out how to add a selector to each record displayed in a listing.

-Assuming you already have a basic listing and it displays the desired data, create an additional field in your table list
-Under "Path" enter _SELECTOR_:
-Give it a Header value, like "Select" and click "update areas

How to add a selector to each record in a CF7 connection image 1

-There should now be a new field in the list titled _SELECTOR_: , drag a checkbox field into the new field
-Leave the label blank unless you want to see it beside the box in each row.
-Under advanced settings, in the selector field, choose Single Entry Selector

How to add a selector to each record in a CF7 connection image 2

You should now have a selector beside each record in your list.
Colnem 09 Apr, 2022
Hi

Sorry but doesn't work for me.

I've always 1 if any box is checked... A data:checkbox is not an array.

What the pb?
different_greyhead 09 Apr, 2022
Hi Colnem,

From the information you have provided, it is hard to say what the problem is. This post is about how to get the selector box to appear beside each record in a CF7 list (or Chrono connection) and it sounds like that has worked as you say you get a 1 if any box is checked.

It looks like you may be having issues with handling the selected record. I assume you have a button that is set to submit the id of a selected record to a page that will read the data and add the id to a where clause. I am assuming you are performing a single record selection. Can you tell me the following?
  1. Is this an advanced form or connectivity app?
  2. Can you post screenshots of your checkbox view -> data and interface tabs?
  3. Can you post a screenshot of your submit button button view -> interface tab?
  4. Can you post a screenshot of your read data action called by your submit button?
More information will certainly make it easier to help you solve your issue.
Colnem 10 Apr, 2022
Hi

The problem is: How to know the records whom checkboxes are selected?

All the checkboxes are the same name.
So after submit, I see only one data, the last checked: select_record =>1.
But what records are checked?

I need to see all the checkboxes data checked in an array...
select_record Array (name1=>value1, name2=>value2, etc)

I think that it's possible using an event and javascript function… or other way
Colnem 10 Apr, 2022
Hi

Thanks for your help

Iv'e found a good solution using Html tag Attribute:
attribute name = name
Value = select[{cont.id}]
Override

So for example If I check line 1 and line 4, after Submit, I find in {data.pr:}:
[select]=>array(cont.id1=>1, cont.id4=>1)
You need to login to be able to post a reply.

VPS & Email Hosting 20% discount
hostinger