1

I am looking to add a grid entry to Channel Form. I can see the field in the Field Groups list, but i cannot locate the Column id for the actual entry.

<input type="hidden" name="field_id_59[rows][new_row_0][]" value="new_row_0" />
<input type="text" name="field_id_59[rows][new_row_0][col_id_**????**]" value=""/>

Many Thanks

0

The easiest way to see at a glance is to just throw the whole field onto the page and then view the source. So include this in your templates:

{field:field_name}

Where field_name is the name of your grid field.

Then you'll be able to identify the column IDs. The code you require will end up looking something like this:

<input type="hidden" name="field_id_1[rows][new_row_0][]" value="new_row_0" />
<input type="text" name="field_id_1[rows][new_row_0][col_id_1]" value="" />

field_id_1 relates to the field ID of the grid field itself and col_id_1 will be the column ID in that grid field that you're targeting.

1
  • That was useful thanks, I also figured out I could look directly into the DB using Tools --> Data --> SQL Manager.
    – user2929
    Apr 3 '14 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.