Skip to main content

Questions tagged [table-field]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
27 views

Replace the value of a table cell (inside a Matrix field)

I have a Matrix field, and blocks have a Table field inside of them, with two columns: event and category. I want to now set anything with category 'A' to category 'B' via a module (listening to Entry:...
supazu's user avatar
  • 526
1 vote
1 answer
46 views

Get default field values on pre-existing elements

related to How can I populate a dropdown via table field type using the default values? I created a table to be used for ordering a display via the order of the table, with a bunch of default values ...
Eric Anderson's user avatar
1 vote
1 answer
193 views

Add rows to table field

I'm having some trouble adding a row to a table field programmatically. I'm iterating over a table inside a Matrix field and would like to save those values to another table (if that makes sense.) ...
supazu's user avatar
  • 526
1 vote
1 answer
162 views

Saving data in a table field in a matrix field via entry form

I have an entry form with both table fields and matrix fields containing table fields. I can save data into the table fields OK with fields[fieldHandle][X][colX] but with the below, I get a matrix ...
Tyssen's user avatar
  • 653
2 votes
0 answers
82 views

How do you access the Label of a Table field column with a Type of Dropdown?

How do you access the Label of a Table field column with a Type of Dropdown? I have a Table field in a Matrix block and one of the column types is a Dropdown. When I use the {{ row.handle }} syntax ...
doctorgloom's user avatar
1 vote
1 answer
81 views

Table Field Row ID?

I need a unique id for each table row. Something like this which does not work: {% for row in block.buttons %}{{ row.id }}{% endfor %} Is this possible? Thanks!
fodney's user avatar
  • 193
1 vote
1 answer
38 views

Table Field fixed column content(placeholder) for all entries

I have a table field with 3 columns, one of them is 'Weekday', Type = single line text. how can I set a placeholder to the weekday column ( Monday, Tuesday,....) in the Control Panel. right now I have ...
Ra3d K's user avatar
  • 125
3 votes
1 answer
108 views

Use own/custom field inside Craft Table

I made my own, fairly simple field inside a Module for Craft 3.x. What settings do i need to define to make it usable inside a table?
Leonardo's user avatar
  • 471
1 vote
1 answer
54 views

How to relate a long survey to a user and later query by values

I'm working on a new project that requires users to fill out a lengthy survey to assess their skills. These skills will then be used to query for users with a front-end interface. My question has to ...
Mosswalker's user avatar
1 vote
1 answer
114 views

Check if a table field’s column has a value

I am using a table field to display credits on a portfolio page. The table field has three columns: hva, hvem and url. The url should be optional and I want to set up an if statement showing it as a ...
Stig Melón-Bratvold's user avatar
2 votes
1 answer
824 views

How to set field values for the table field type in Craft 3

I'm trying to insert an entry along with values for a table field. According to the docs, the setFieldValues method takes an array of values in the format handle => value, but it doesn't specify ...
David Jones's user avatar
1 vote
1 answer
62 views

List elements grouped by multiple dates

The company whose website I'm building host events, and for each of these events, it is only possible to purchase tickets on certain days, but for each event, there can be more than 1 such day. They ...
Bruce Johnson's user avatar
1 vote
0 answers
232 views

How to use a table field in custom plugin's settings (Craft 3)

I need a table field in my plugin's settings, but when I make 2 rows and save the settings, only the first row is shown when I go back to the settings page. When I dump the values, my second setting ...
Ryan's user avatar
  • 1,952
4 votes
1 answer
1k views

Feed Me: How to format CSV data for a table field

Similar to the other post Feed Me: How to format JSON for a table field. I'm looking for a solution on how to format the CSV field so I can import it as a table field. Basically I have a list of ...
Tim Knight's user avatar
  • 1,022
1 vote
1 answer
222 views

order by Table Number Field

% set entriesList = craft.entries.section('parks').relatedTo(entry.Line.one()).all %} {% if entriesList|length %} <div id="found-in" class="park"> <ul> {% for ...
Markus's user avatar
  • 53
2 votes
2 answers
764 views

Query Craft CMS Table Field for exact values

Am I correct in saying you cannot search for specific text in a table field. e.g. Table Fields Might hold the following data: SKU1 SKU2 SKU3 SKU33 I then want to search for items that only return ...
Dean Sanderson's user avatar
2 votes
1 answer
88 views

Craft CMS 3 data structure advice for vehicle make, model, trim, year tagging

Hi i really would like some advise on best practices on setting up some data for my Craft APP. Most of my documents will be linked to vehicle make/model/trim/year. EG Audi A5 Sport 2009-2016 and/Or ...
Dean's user avatar
  • 23
1 vote
1 answer
176 views

Loop over table field in Element API plugin

How can I output the rows and values of a table field using the element api plugin? Where I have entries I do ... $industries = []; foreach ($entry->industries->all() as $industry) { $...
Steven Grant's user avatar
  • 1,855
1 vote
1 answer
297 views

Element criteria with a table field

I am trying to build a query to fetch some entries which I want filter on a table field between multiple values. The table field is "filterTestWidth" and has 1 col named "size" (number type). There ...
RvdB's user avatar
  • 80
1 vote
1 answer
126 views

table field - make one culumn translatable, other common for all languages

Lets say i have table field with product technical specification - two columns, one for feature name, one for feature value. Feature name (for example - "weight") needs to be translated across ...
Ded Nolyxeux's user avatar
0 votes
0 answers
123 views

How do I create an index page that loop through the table fields of its entries?

Every entry in a section has a table. The table depicts sales over 7 years. I want to create an index page that lists the title of each entry and the sales for each entry in the section. I know ...
Hellyar's user avatar
  • 921
1 vote
1 answer
50 views

I have a table type field that I need to access to rows individually

I'm new using Craft, I have a table type field display on one of my template but I need to display row 2 and 7 in different places of the page how can display only those two rows.
Azazel's user avatar
  • 101
0 votes
1 answer
129 views

Help with FeedMe JSON

I am trying to insert records into the same entry using FeedMe with Matrix and Table for one of the fields. My table field is a plain text. So I have one programLevel, one program and a field that ...
Vin's user avatar
  • 383
1 vote
1 answer
68 views

Can you store a table field within a matrix field?

I am looking to use a matrix field for my site navigation that has some dropdowns. Using a table field within a matrix field seems like it would work but I don't know how to access the table inside ...
Danielle Frappier's user avatar
2 votes
2 answers
1k views

Adding Columns to a table

Is there a way or a plugin that allows you to add columns and change columns heading from within the entry? Instead of defining column heading while creating the table field. It would be nice to have ...
user6999's user avatar
  • 157
1 vote
2 answers
301 views

Conditionally show table column headings

Is there a way to conditionally display a table column heading if the table field row has been entered? i.e. if my table has up to 3 columns and I fill in ALL the fields like this I'd see ch1 | ch2 |...
Kev N's user avatar
  • 151
2 votes
1 answer
814 views

Saving to table field via plugin

I'm dealing with the import plugin, processing a .csv file. in the .csv there's a column with | separated values that shoud be inserted in a table field. The entry are created correctly, also the ...
Alessio Breviglieri's user avatar
1 vote
2 answers
817 views

Loop by column from a table

How can I loop from col2 to col4 ? Or loop by column heading handle? Remplace {{ row.col2 }} <ul class="features small-font-size"> {% for row in block.tableHandle %} <li data-...
NovoWeb's user avatar
  • 11
2 votes
1 answer
708 views

Feed Me: How to format JSON for a table field?

I need to import some data into a table field. What's the best way to format the data in my original JSON feed? I've tried this: [ "first value", "second value", ] and this: [ {"col1":...
Lindsey D's user avatar
  • 24k
1 vote
1 answer
195 views

Table field type defaults

I have built a few fields with the Table field. I noticed an odd behavior maybe it's normal, but want to check. I use a Table field with defaults entered, the defaults do not show up. Now for the ...
Vin's user avatar
  • 383
1 vote
1 answer
301 views

Limit rows using Table

This is my code I am using, but want to limit it to just one and possibly randomize it also. Is it possible with Table, I looked at the example on Craft's site but did not see that option. {% for ...
Vin's user avatar
  • 383
3 votes
1 answer
555 views

Creating a editable table with Element Select in column

First of all, I'm starting in Craft in general so I'm having a hard time with things that might be basic. I want to create a editable table with a Element Select in a column. Like: I already have ...
Jorge Anzola's user avatar
1 vote
1 answer
1k views

Count table field values in certain section

I would like to know, how many values are saved in the table field called "artikelnummer" with the field name "artikel". The section is called "bikes". I tried: {% set entries = craft.entries.section(...
TomS's user avatar
  • 213
2 votes
1 answer
478 views

Table fields, default single empty row, and never returning as empty?

I'm having a small problem with table fields. My issue is that by default a table fields starts with one row. Even if you leave this row empty (no values at all in any column) the field will never ...
Benek Lisefski's user avatar
3 votes
1 answer
120 views

How do I prevent empty table rows from being created when a front end form is submitted?

I have a front end form which contains text fields that are connected to a Craft table field. The issue I have is that if I do not fill out the text input fields on the front end it is still creating ...
Lori's user avatar
  • 866
3 votes
1 answer
302 views

Why won't the Import plugin accept this JSON string?

Importing data.csv using Bob Olde Hampsink's Import plugin. Given that data.csv has a 'table' item string thusly: "Alcohol and Drug Treatment:RX-8450.3300,Counseling:RP-1400.8000-145,Mental Health ...
Steve Mock's user avatar
2 votes
1 answer
598 views

Is it possible to search an entry for specific table content

Considering the way table field content is saved to the database, could I search entries for content in a specific column? So, say I have a table field containing X column, I would only want to ...
Paul's user avatar
  • 6,338
0 votes
1 answer
307 views

<form><matrixBlock><checkbox></matrixBlock></form> How do I store multiple form entries in 1 table field?

A tricky one. I have a form which sits on a section entry template. When user submits form from one page of the template, it saves the entries into the table. BUT user going to another page of the ...
Rich Holt's user avatar
0 votes
1 answer
49 views

Show a quote on my login page

I have a number of entries, each with a quote (table field with one phrase and author row). I would like to show one quote on my login page, but some of these entries do not have quotes. How can i ...
Vitor's user avatar
  • 25
0 votes
1 answer
91 views

How to reverse the rows in a table?

I could do with flipping the rows in a table, within a template. Is that possible?
Clive Portman's user avatar
0 votes
1 answer
626 views

How can I populate a dropdown via table field type using the default values?

In the CP I have a table field called colors. I have two columns, "Label" and "Value". I have populated the table with two default values "Red" and "Blue" (attached). This table will ultimately ...
Damon's user avatar
  • 4,706
3 votes
3 answers
2k views

Check if a table field’s row has a value

We have a table field that has the default value of 1 row when a new entry is published. Unfortunately, we have {% if entry.tableField | length %} display markup and field content... {% endif %} ...
Steven Grant's user avatar
  • 1,855
2 votes
1 answer
796 views

How do I query for entries, based on a value inside a table?

I'm trying to query up some entries based on a value inside an editable table. Here's two pictures on how it's set up: https://i.sstatic.net/UW9yV.png https://i.sstatic.net/P4Gtc.png My current ...
Ole's user avatar
  • 245
2 votes
1 answer
63 views

How do you not output table field if there are no values?

I'm doing, what I think should work fine, however, I'm still getting a blank table output on the page if the table field is left unfilled when creating the entry. It's like the "if" check is being ...
Herb Himes's user avatar
1 vote
1 answer
341 views

Interacting with table fields via plugin

When you set up a table field column through the admin cp, you assign a name and a handle. When I var_dump the table field, all row data is referenced by column number. (e.g. col1, col5, col2, col3, ...
David Rampersad's user avatar
2 votes
1 answer
845 views

Show just the first row of a table (stored in globals)

Morning Craft folks, I've had a look and play but can't seem to find an answer for this. I have a global variable with a company's various phone numbers in, stored in a table field. The table shows ...
Pathfinder's user avatar
3 votes
1 answer
1k views

Evenly dividing up table items in columns

I'm building out my first Craft site and learning a whole lot so far. Coming from ExpressionEngine, this really seems like what EE should have been. Anyway, I'm trying to find a way divide up ...
ninjaroll's user avatar
1 vote
2 answers
1k views

Get last row in table field for loop

How can I determine if the row being returned from a table field in a for loop is the last row?
toffeejay's user avatar
  • 119
1 vote
1 answer
844 views

Can you delete rows from a table field on the front end?

I have a table field which is attached to users, before I go ahead and create the logic for adding rows on the front end via ajax, I need to know if I am going to be able to easily add the facility to ...
Sam Hibberd's user avatar
5 votes
1 answer
2k views

Accessing a Matrix field in a Global

I have created a Global with the handle 'footer', which contains a Matrix field 'links' and I'm trying to get this into a template, but I can't seem to get this to work. The 'links' Matrix contains a ...
doubleplusgood's user avatar