Forums

No more brackets in the Field name text box?

Fredolino 16 Sep, 2022
Hi

In CC6, for example, I had as a field name
author[{var:main_list.row.HA.art_id}]
is this no longer possible or is it a bug?
The brackets are deleted.
How can I now use this as a field name in the text field in the new version?

F.
Fredolino 17 Sep, 2022
My question has been resolved.
In CF7 it works without this constellation in the name field.

In the CC6 frorm, this code in "Field Name" was useful because I used it in the context of editable text fields in a "Table List".
In CF7 it is a bit easier to display all data from a database table in a "Table List".

For this I first created a "Read Data" for the database table:
Source Table: DB_list
Model: DBL
Select: All Matching Records

So that I can later edit and save the individual data records from the database, I created individual "Save Data" actions for all database table columns.
For example
Save Data Action with the names: "update_column1"
Target Table: DB_list
Model: DBL_ column1
Action: Update existing record
Data Sets: Whole Form Data

Advanced settings
Data source:
Table field name: column1

Value: {var:save_column1_loop.row}
Value Type: Use Value
Action: update

Where Condition
Fredolino 18 Sep, 2022
ID_from_DB_liste = {var:save_column1_loop.key}

After that I create a loop:
Name: save_column1_loop
Data provider: {data:column1}

In the body I draw an "Action Reference" (at the top of the menu under "Basics").
In this reference I now select: xxxx-update_column1

Of course, always save everything. ;-)
I now create these actions for all database columns that I want to display in the table.
It is important that the same model name is not used in "Save Data"!
So for
Save Data Action with the names: "update_column2"
Target Table: DB_list
Model: DBL_column2

etc...
Fredolino 18 Sep, 2022
Answer
Under "Views" I create a "Table list" based on the database table "DB_liste".

After saving, the blue individual table columns become visible, into which I now drag a text field and adapt the unit title and name to distinguish them (column1_list_field).
As "Field Name": Model_from_Database_read_data (in the example: DBL), so:
DBL.column1

Select under Advanced Settings: "Value & Placeholder"
Value: {var:DBL.column1}

Repeat these steps for all table columns that are to be displayed.
In addition, the buttons for "Add new data record" and "Edit and save data record".

Finished. It works for me anyway. :-)

F.
You need to login to be able to post a reply.