Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [table-field]

The tag has no usage guidance.

1
vote
1answer
16 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) { $...
1
vote
1answer
28 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 ...
1
vote
1answer
26 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 ...
0
votes
0answers
18 views

Migrate from Table to Matrix field

Is there a way to migrate from a table field to a matrix field without loosing data? I have a table field that has 8 columns. Reasoning is I cannot search through a table field using craft.entries ...
0
votes
0answers
15 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 ...
1
vote
1answer
21 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.
0
votes
1answer
64 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 ...
1
vote
1answer
24 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 ...
2
votes
2answers
122 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 ...
1
vote
1answer
58 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 |...
2
votes
1answer
127 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 ...
1
vote
2answers
150 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-...
3
votes
1answer
218 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":...
1
vote
1answer
64 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 ...
1
vote
1answer
149 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 ...
2
votes
1answer
208 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 ...
1
vote
1answer
263 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(...
0
votes
0answers
63 views

Toggle Tabs getFields

I am running a local dev version of a Craft implementation. I'm testing things and on one of the 'create' pages the content does not load fully. I have traced the issue to the following code block: &...
1
vote
1answer
142 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 ...
3
votes
1answer
66 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 ...
3
votes
1answer
280 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 ...
2
votes
1answer
254 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 ...
0
votes
1answer
250 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 ...
0
votes
1answer
39 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 ...
0
votes
1answer
58 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?
0
votes
1answer
359 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 ...
2
votes
2answers
561 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 %} ...
2
votes
1answer
247 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: http://i.imgur.com/lJFcO1C.png http://i.imgur.com/Eqxg7Uh.png My current ...
2
votes
1answer
55 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 ...
1
vote
1answer
114 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, ...
2
votes
1answer
329 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 ...
3
votes
1answer
572 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 ...
1
vote
2answers
677 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?
1
vote
1answer
490 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 ...
3
votes
1answer
1k 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 ...
1
vote
1answer
246 views

Date-time field within tables

I'm after using a date-time field within a table cell. I suspect it requires a plugin to make this happen - has anyone done this?
2
votes
4answers
567 views

Double storage of values in table-field

I'm currently creating some standard templates which should help to find good defaults for matrix output. This is where I stumpled upon the somehow weird structure of table data. Here's a simplified ...
4
votes
1answer
627 views

Inserting data into a table fieldtype via plugin?

I'm trying to import data from another database into a 'table' fieldtype via a plugin, and have a couple questions. When setting the content on the EntryModel, are there any methods to assist in ...
14
votes
5answers
4k views

Solution for Matrix-within-Matrix (or More Robust Table Fields)

I was wondering if anyone has stumbled on a good solution for including matrix-like fields within a matrix block. I’m working on a site where each page's is constructed in one big matrix with several ...
2
votes
1answer
415 views

Is there a way to output certain rows (or filter) from a table?

Here's an example, I have three columns in a table: ClassQuarter, Course No, Description. I would like to output rows only with ClassQuarter == '1' in a HTML table, then output rows where ...
1
vote
1answer
73 views

Index “Column A” for unique values, then recursively group “Column B” values based on those uniques

I have two levels of product variants in a table field. If the product uses Secondary Variants, I need a way to search the Primary Variants column for unique values, then output individually grouped ...
1
vote
1answer
342 views

Can a Table Column be Rich Text / WYSIWYG?

The only types in the list are Single-line text, Multi-line text, Number or Checkbox.
0
votes
1answer
244 views

Saving to Table Field Type via Plugin

I keep getting a server error when attempting to save data to a table field. This is the code I am using test data insertion. (251 is a valid enteryId) $entry = craft()->entries->...
1
vote
1answer
221 views

Why won't the values of an editableTableField show up in my template?

I'm still trying to process my csv data as mentioned in a former question. But I'm struggling with another part of this right now. I decided to implement a custom field type which should display the ...
5
votes
1answer
205 views

Entry with many fields vs plugin/custom data structure

i'm just getting my feet wet with craft and would appreciate some pointers. Basically, what i would like to do is show and compare products. Each product will have a description, price, review, and ...
2
votes
1answer
935 views

Show a table field's column headers in template?

The question says it all. I have: A Matrix field, with A subfield with the type table Two columns within that table of which I want to show the column headers in my template Is that possible and if ...
3
votes
1answer
150 views

Is there a way to purge old data in a table?

I have some tables in a matrix field and when I created the columns, originally I named them Col 1, Col 2, etc. That made sense to me but later I decided that since the client will be entering data, ...
5
votes
2answers
2k views

How to correctly output a Table Field?

I have set up a Matrix field with three blocks, each contains a Table field. Each table has one column - a single line text field. When I call these tables into the template with this code, each row ...