Bug #23229 Accepted

Grid field next_row variable pair conditional parsing issue

Version: 4.3.2 Reporter: Robin Sowell

If I create a text field called ‘test’ and I just put either an a or nothing in it, and then I test whether the next row’s value exists, I’m not getting the expected results.

Here’s what the template looks like:

{exp:channel:entries channel="class_schedual" status="not closed"}

              {classes_grid}
              


                    This row is #{classes_grid:row_id}. Is the toggle true? value: {classes_grid:test}
            
                    {if classes_grid:test}
                    YES___
                    {if:else}
                    NO___
                    {/if}
            
                    {classes_grid:next_row}
            
                        The next row is #{classes_grid:row_id}. Is that toggle true? value: {classes_grid:test}. conditional: 
            
                        {if classes_grid:test}
                        yes
                        {if:else}
                        no
                        {/if}
        {/classes_grid:next_row}
         {/classes_grid}

{/exp:channel:entries}

It shows the correct value for the next row, but the conditional only works if braced a la:

{if '{classes_grid:test}' != ''}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases