# Problem with If...Else Statements

**URL:** <https://forum.kirupa.com/t/problem-with-if-else-statements/314334>\
**Category:** Uncategorized\
**Created:** [September 25, 2010, 12:59am UTC](https://forum.kirupa.com/t/problem-with-if-else-statements/314334 "2010-09-25T00:59:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![massi64](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@massi64](https://forum.kirupa.com/u/massi64)\
**Post date:** [September 25, 2010, 12:59am UTC](https://forum.kirupa.com/t/problem-with-if-else-statements/314334/1 "2010-09-25T00:59:51Z")

</div>

Hi Everybody  
I try to build a form with checkboxes dropdown menus etc. what I will like this code below is if the first checkbox it is check then write the rest of the code , if not go to the next code and don’t consider the line

```auto
<tr>
<td class="alt2" valign="middle">
<input type="checkbox" name="checkboxanswer2" value="$checkboxchoice2" <if condition="$checkboxchoice2 == $checkboxanswer2">checked="checked"</if> /> $checkboxchoice2
</td>
<td class="alt2" valign="middle">
<select name="dropdownanswer2">
<option value="$dropdownchoice2a" <if condition="$dropdownchoice2a == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2a</option>
<option value="$dropdownchoice2b" <if condition="$dropdownchoice2b == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2b</option>
</select></td>
<td class="alt2" valign="middle">
<b>$dropdownquestion3</b>:
</td>
<td class="alt2" valign="middle" colspan="3">
<select name="dropdownanswer3">
<option value="$dropdownchoice3a" <if condition="$dropdownchoice3a == $dropdownanswer3">selected="selected"</if>>$dropdownchoice3a</option>
<option value="$dropdownchoice3b" <if condition="$dropdownchoice3b == $dropdownanswer3">selected="selected"</if>>$dropdownchoice3b</option>
</select></td>
 
next code
 
next code1
 
next code2 
 
etc..

```

this is in xml

I need some help :book:  
Thanks

I hope I wrote this on the right section
