Closed jnsandrew closed 11 years ago
Can you try this:
{if {selected:search:opp_tags="course"}}{/if}
Nope, if I copy and paste what you typed i get:
Parse error: parse error in /Users/andrewjones/Sites/website/ee-admin/expressionengine/libraries/Functions.php(679) : eval()'d code on line 88
If I add quotes like this:
{if "{selected:search:opp_tags="course"}" } {/if}
I get:
A PHP Error was encountered
Severity: User Warning
Message: Invalid EE Conditional Variable: {if "{selected:search:opp_tags="course"}
Filename: libraries/Functions.php
Line Number: 2749
Just the tag on its own has no errors, just shows the tag on the page (so it doesn't recognise it)
{selected:search:opp_tags}
I was afraid that might happen. You'll need to grab this version (https://github.com/rsanchez/dynamo/tree/develop) and then do this:
<label>
<input type="checkbox" name="search:opp_tags[]" value="course" {if {exp:dynamo:selected value="course" in="{search:opp_tags}"}}checked="checked" {/if} />Course
</label>
Thanks Rob, I'll try this when I'm back at work on Monday. I'm already on the develop branch.
Awesome, that solves the problem! Thanks.
Hi,
I'm having slight trouble getting my checkboxes to stay checked after submitting my form:
The problem is with the IF statement. Using the code above, if I only check one box, it stays checked, but if I tick multiple, nothing stays checked.
I've also tried adding {if search:opp_tags[] == "exhibition} for example, including the [], that doesn't check anything - if i choose one or multiple checkboxes.