Low Variable conditional inside of another conditional
EE version 1.73
LV version 1.37
I set up a LV radio field to control whether to show or hide elements within certain templates. I'm able to get it to work in some templates but not others. I'm assuming for the places I am unable to get it to work that it's a parse order issue that I am running into.
In the template I want to show/hide a form submit button depending on what radio field choice is made. My LV name is "lv_scan_assign".
Here's my code:
{if scan_upload_approve_reject == "Approved" OR scan_upload_approve_reject == "Accepted"}
<!--Show if Program is Open in LV-->
{if lv_scan_assign == "Open"}
<input type="hidden" name="status" value="Completed"/>
<input type="submit" value="I have read and accept this review »" id="submit" class="button big green" name="submit"/>
{/if}
{/if}
Thank you very much for your help.
Lori
Replies
Low 17 Sep 2012 06:55
Hi Lori,
Is Early Parsing enabled for the lv_scan_assign variable?
L2 17 Sep 2012 08:56
Hi Low,
Yes, early parsing is enabled.
Could it be because I'm placing it in an embedded template? I tested it in a parent template and got it to work.
Thanks,
Lori
Low 17 Sep 2012 08:59
It shouldn't matter if it's in an embedded template, really. What happens when you use the syntax like this?
L2 17 Sep 2012 17:12
Hi Low,
I tried it again using my original code and it worked.
I have similar pages and I must have been looking at the front end of the wrong page. I'm very sorry to have taken up your time. Feel free to delete this post.
Off topic: I've been able to do some great things with Low Variables and I know I've only touched the surface. Have you ever considered making videos for sale that covered topics like parse order, variable types like checkboxes, common uses, etc.? Your docs are really helpful but as a newbie I'm still missing some things like getting checkboxes to work. Maybe people who have done some amazing things would even want to contribute.
Thanks (and sorry again),
Lori
Low 18 Sep 2012 06:46
No worries, good to know it's working. :)
I've done a couple of blog posts to explain to people what can be done with LV. I guess it needs a bit of a lightbulb moment itself. Maybe I'll look into doing videos, but for now, I'll stick with a blog post every now and then.