Hi Guys I need help Form If/Else Statements

38 views
Skip to first unread message

Shad Roi de la Cruz

unread,
Jul 24, 2015, 4:15:05 AM7/24/15
to Liquid Templates

What i want to do is to create a form with radio buttons that has a condition that for example


{% if radio1.selected %}
show input1;
{% if radio2.selected %}
show input2;

How can I make it work? I've been trying to figure this out since yesterday. Thanks guys! :)

Kristian Brito

unread,
Aug 14, 2015, 1:09:41 PM8/14/15
to Liquid Templates
{% if radio1.selected %}
 show input 1

{% elsif radio2.selected %}
 show input 2

{% endif %}

If the selected variable has a certain value that makes it true:

{% if radio1.selected == 'true' %}
 show input 1

{% elsif radio2.selected == 'true' %}
 show input 2

{% endif %}
Reply all
Reply to author
Forward
0 new messages