We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How can you loop thru all rows of a grid if no content yet?

How Do I?

pelluche's avatar
pelluche
38 posts
one year ago
pelluche's avatar pelluche

I’m trying to loop thru my grid field with 10 rows minimum/maximum. all fields are empty in the grid to start and will get updated via exp:channel:form, but i can’t loop thru each row to get the actual row_id’s to create input fields to submit to.

       
pelluche's avatar
pelluche
38 posts
one year ago
pelluche's avatar pelluche

seems like if grid empty, you can update the fields initially with [new_row_x] within a channel form. You just need to get the col_id from within CMS Entries.

<input type="hidden" name="grid_field[rows][new_row_1][col_id_218]" value="1">
       
Sarah93's avatar
Sarah93
12 posts
one year ago
Sarah93's avatar Sarah93

For empty grid rows, you can use the [new_row_x] syntax in your channel form. Since you know you want 10 rows, you can pre-populate those hidden inputs.

       
evearrest's avatar
evearrest
1 posts
one year ago
evearrest's avatar evearrest

First, let’s investigate typical worlds. You may select among planets like the Earth, Mars, Jupiter, and Venus.

       
Sammy Yaz's avatar
Sammy Yaz
1 posts
one year ago
Sammy Yaz's avatar Sammy Yaz

You can loop through all rows of an empty grid by checking for content and then setting up a loop for future entries.

Similar to how wholesale epoxy adhesives suppliers prepare for demand, this ensures smooth processing when content is added.

       
rickrode's avatar
rickrode
2 posts
about 11 months ago
rickrode's avatar rickrode

The Ragdoll Hit offers numerous levels, each presenting unique challenges and enemies. Players must navigate through these levels, culminating in intense boss fights that test their skills and strategy.

       
Julie Branch's avatar
Julie Branch
2 posts
2 weeks ago
Julie Branch's avatar Julie Branch

Stickman Hook is an action-packed physics-driven game that challenges players to master timing and momentum. Control a springy stickman and swing across dynamic levels using a grappling hook.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.