close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Validating Checkbox Group

Thread began 12/11/2009 11:07 am by christina.elissa4324782 | Last modified 12/14/2009 2:23 pm by christina.elissa4324782 | 3368 views | 3 replies

christina.elissa4324782

Validating Checkbox Group

I have added field forms to the contact form solution pack. All is working except:
1. the server validation for the checkbox group will not go away, even when something is checked.
2. the email that is received from the form is not listing the checkboxes. It will only say "Sessions: Array" or "Session: on"

Here is the code I am using in reference to that checkbox group:

$WAFV_Errors .= WAValidateRQ(((isset($_POST["Sessions"]))?$_POST["Sessions"]:"") . "",true,9);

<div id="sessions" class="formInput BoxBorderTop">
<ul class="radioButtons">
<span id="sessions">
<li>
<input type="checkbox" name="Sessions[]" id="All_Sessions" <?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"" ) ?> />
<label for="All_Aessions">All Sessions</label>
</li>
<p class="day">Wednesday, January 20</p>
<li>
<input type="checkbox" name="Sessions[]" id="Wed_Morning_Sessions" <?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Wednesday_Morning_Sessions">Morning Sessions</label>
</li>
<li>
<input type="checkbox" name="Sessions[]" id="Wed_Afternoon_Sessions" <?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Wednesday_Afternoon_Sessions">Afternoon Sessions</label>
</li>
<li>
<input type="checkbox" name="Sessions[]" id="Wed_Luncheon"<?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Wednesday_Lunhceon">Luncheon</label>
</li>
<br class="hide" />
<li>
<input type="checkbox" name="Sessions[]" id="Wed_Dinner" <?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Wednesday_Dinner">Reception & Dinner</label>
</li>
<br />
<p class="day">Thursday, January 21</p>
<li>
<input type="checkbox" name="Sessions[]" id="Thurs_Morning_Sessions" <?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Thursday_Morning_Sessions">Morning Sessions</label>
</li>
<li>
<input type="checkbox" name="Sessions[]" id="Thurs_Afternoon_Sessions"<?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Thursday_Afternoon_Sessions">Afternoon Sessions</label>
</li>
<li>
<input type="checkbox" name="Sessions[]" id="Thurs_Luncheon"<?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Thursday_Luncheon">Luncheon</label>
</li>

<span class="checkboxMinSelectionsMsg">Please choose at least one
session you will be attending.</span></span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "9" . ",") !== false || "9" == "")) {
if (!(false)) {
?>
<span id="sessionServerError" class="textfieldServerError">Please choose
at least one session you will be attending.</span>
<?php //WAFV_Conditional contact.php contact(9: )
}
}
}?>
</ul>
</div>

Thank you in advance.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...